Giter Site home page Giter Site logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
I wonder what it will take to update this to use OAth2.  I don't have any time 
this week to figure it out, but I'm sure (hopefully) that someone else will be 
able to look at this.

At one point, I was looking to make this use an AuthKey instead of username and 
password (i.e. - support 2-step Authentication).

Original comment by [email protected] on 8 Jun 2015 at 2:02

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
I also face the same issue.

Original comment by [email protected] on 25 Jun 2015 at 11:33

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
I just encountered this issue as well. I have only a bit of familiarity with 
the code in this project but will dive in further today. Someone with OAuth 2.0 
experience would probably be better equipped to make the needed changes.

Original comment by [email protected] on 26 Jun 2015 at 6:34

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
This project supposedly has a working Google Voice login: 
https://github.com/twyatt/gv4j. The login is implemented in this file: 
https://github.com/twyatt/gv4j/blob/master/src/main/java/com/brewengine/gv4j/GV.
java.

Original comment by [email protected] on 27 Jun 2015 at 10:50

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
Hi, I would like to know if somebody has already started to try the OAuth 
addition to this project. I'm a java dev and I could look into comment #4 
solution and try to add this to the current project.

Thanks !

Original comment by [email protected] on 4 Jul 2015 at 2:58

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
I was able to get things working by:

1. Extracting cookies from the accountURLString below.
2. Doing an HTTP POST to the loginURLString below (passing the cookies obtained 
in step 1).
3. Following all redirects and meta refreshes, storing and retrieving cookies 
along the way.
4. Continuing to store and retrieve cookies when making any subsequent HTTP 
requests.

Unfortunately, the code I have so far isn't particularly polished, and it fails 
when Google prompts to associate a verification phone number for the Google 
account. (I worked around this problem by manually logging in and dismissing 
the verfication prompt.)

  /** The Constant loginURLString. */
  final static String loginURLString = "https://accounts.google.com/ServiceLoginAuth";

  /** The Constant accountURLString. */
  final static String accountURLString = "https://accounts.google.com/ServiceLogin?service=grandcentral&continue=https://www.google.com/voice&followup=https://www.google.com/voice";

...
...
...

  String data = URLEncoder.encode("GALX", enc) + "=" + URLEncoder.encode(galx, enc);
  data += "&" + URLEncoder.encode("continue", enc) + "=" + URLEncoder.encode("https://www.google.com/voice#inbox", enc);
  data += "&" + URLEncoder.encode("followup", enc) + "=" + URLEncoder.encode("https://www.google.com/voice#inbox", enc);
  data += "&" + URLEncoder.encode("service", enc) + "=" + URLEncoder.encode(SERVICE, enc);
  data += "&" + URLEncoder.encode("_utf8", enc) + "=" + URLEncoder.encode("☃", enc);
  data += "&bgresponse=js_disabled";
  data += "&pstMsg=0";
  data += "&dnConn=";
  data += "&checkConnection=";
  data += "&checkedDomains=youtube";
  data += "&" + URLEncoder.encode("Email", enc) + "=" + URLEncoder.encode(user, enc);
  data += "&" + URLEncoder.encode("Passwd", enc) + "=" + URLEncoder.encode(pass, enc);
  data += "&" + URLEncoder.encode("signIn", enc) + "=" + URLEncoder.encode("Sign in", enc);
  data += "&PersistentCookie=yes";
  data += "&" + URLEncoder.encode("source", enc) + "=" + URLEncoder.encode(source, enc);

  if (pCaptchaAnswer!=null && pCaptchaToken!=null) {
    data += "&" + URLEncoder.encode("logintoken", enc) + "="
      + URLEncoder.encode(pCaptchaToken, enc);
    data += "&" + URLEncoder.encode("logincaptcha", enc) + "="
      + URLEncoder.encode(pCaptchaAnswer, enc);

Original comment by [email protected] on 4 Jul 2015 at 6:44

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
w.r.t. comment #6 [email protected],
Can you please post the complete code?

Original comment by [email protected] on 6 Jul 2015 at 12:54

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
Anyone come up with a viable solution for this issue?

Original comment by [email protected] on 5 Aug 2015 at 3:58

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
I outlined the solution that worked for me in comment #6. It's still working 
just fine for me for connecting to Google Voice and sending SMS.

I didn't go through and update every endpoint in the API and test that each of 
them still works. So it doesn't seem like a good idea for me to post the code 
to the repository.

But see the attachment for what I have for 
com.techventus.server.voice.Voice.java if it helps.

Original comment by [email protected] on 10 Aug 2015 at 3:36

Attachments:

from google-voice-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.