Skip to content
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.

does not work anymore? #1

Closed
RONNCC opened this issue May 6, 2013 · 9 comments
Closed

does not work anymore? #1

RONNCC opened this issue May 6, 2013 · 9 comments
Labels

Comments

@RONNCC
Copy link

RONNCC commented May 6, 2013

I get server errors every time I try to send data ... has the google end been changed?

@korylprince
Copy link
Owner

It just now worked for me, so it is still working.

I only tested the SMS part. Perhaps you can give me more info on the error and I can try and help?

You did create an application password and use the get_auth.py script? Then use the parameters output from that for running the client?

@RONNCC
Copy link
Author

RONNCC commented May 6, 2013

huh .. can you send me the gist you used? I'm using the example on the
sphinx page exactly and that's not working - i changed LOGIN to the google
/grandcentral thing; besides that nothing. so I can login but then on the
SMS HTTP part it returns an error due to the server response

On Mon, May 6, 2013 at 1:10 PM, Kory Prince [email protected]:

It just now worked for me, so it is still working.

I only tested the SMS part. Perhaps you can give me more info on the error
and I can try and help?

You did create an application password and use the get_auth.py script?
Then use the parameters output from that for running the client?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-17494402
.

@korylprince
Copy link
Owner

First, I'll be honest and say I don't have a clue what you're talking about. From what you're saying, it sounds like you've confused this project with something else. If you are talking about this project, then you can follow the steps below to get it working.

I'll run through the exact steps I used:

  1. Make sure your google voice account exists and has a number assigned to it.
  2. Go to https://accounts.google.com/b/0/IssuedAuthSubTokens and create an application password (password will be 4 sets of 4 letters. You will use that password below, not your normal login password.)
    (using linux)
  3. $ cd /tmp
  4. $ git clone https://github.com/korylprince/pygvoicelib.git
  5. $ cd pygvoicelib
  6. $ ./get_auth.py

ex:

$ python get_auth.py 
username:korylprince
application password: beibfifrhedsvmyo 

import pygvoicelib                                                                                                                          
username="korylprince"
apppass=" beibfifrhedsvmyo "
auth_token="DQAAAO8AAAB_4mNBECup67yFPAQa2GZEqkeQn4ntCn1o0DxuYczxMg3vxTRLzeSwIpFNoVSBN1lIBfujpdfD3k-YriCj1G8DgWuyJwzsUjZwFQZCYbaTOurn4wkJhMKbHh90tZWw_Slq3fgZguFZO5Cnv_ldTHDVFHj1TNX1OKwJx7xqQiM2B8B-0s6Y0RTzs0cOcGkxfp2Kfj1gpqNBwnh_xokC3gezk9_-EZ8TcQKK1La1Fa89mx-SLyYyb1AAKqvDTIbaUCoxQLfYtkeJDatW08gx3VXDLqoX0h0sinuxp7T1N0IS8psGlLXTGx_3T6sn0-ygKho"
rnr_se="y9XGAARkGq3WDWEUlJF4igg4MT4="
client = pygvoicelib.GoogleVoice(username,apppass,auth_token,rnr_se)
#replace number with phone number below
#client.sms(number,"test")

Now take that script and put it in a new file.
You must send the text to a US number I believe (not sure though.)

@RONNCC
Copy link
Author

RONNCC commented May 14, 2013

using exactly that code and only replacing number I get:

sghose@NIO:~/Github/gvoicebot_2$ python sms1.py

"
Traceback (most recent call last):
File "sms1.py", line 8, in
client.sms(',"test")
File "/home/sghose/Github/gvoicebot_2/pygvoicelib.py", line 341, in sms
'_rnr_se':self.rnr_se}, mode='raw')
File "/home/sghose/Github/gvoicebot_2/pygvoicelib.py", line 224, in get_auth_url
raise ServerError(err_code, resp)
pygvoicelib.ServerError: (500, '\n\n<TITLE>Internal Server Error</TITLE>\n\n\n

Internal Server Error

\n

Error 500

\n\n\n')
"
ehh sorry for the formatting, those are newlines.
http://pastie.org/7908212

the code is at: https://gist.github.com/RONNCC/5578681

are you sure you can receive the sms also?

@korylprince
Copy link
Owner

May I assume that you didn't actually copy and paste that code? Because if you copy and pasted the code then it would have my (invalid) credentials.

So assuming you did

python get_auth.py 
username:<your username>
application password: <your application password>

Then used that code, I can only think of a few issues that might happen.

First, you are in the US, and you do have a Google Voice account with a valid US number?
You are trying to send to a US number

You entered the number in the client function as a string

The only other thing that I can think of is if you don't have two-factor authentication turned on, try turning it on.

The only way I can offer you more help is if you somehow dump the packets you send and receive. But since it's over ssl, you'll have to decrypt them somehow.

@RONNCC
Copy link
Author

RONNCC commented May 14, 2013

no I did not exactly copy and paste it - i of course took out my
credentials and used the code generated from get_auth, otherwise the auth
token would be wrong, I also used my app password from the 2 step
authentication page. I am in the US and did sign up my number with google
voice - e.g. it sends me transcribed voicemails. I am sending it to myself.
... how else would i send the number of not as a string? e.g.
sms('1111111111', 'hello'). ?

On Tue, May 14, 2013 at 3:31 PM, Kory Prince [email protected]:

May I assume that you didn't actually copy and paste that code? Because if
you copy and pasted the code then it would have my (invalid) credentials.

So assuming you did

python get_auth.py
username:
application password:

Then used that code, I can only think of a few issues that might happen.

First, you are in the US, and you do have a Google Voice account with a
valid US number?
You are trying to send to a US number

You entered the number in the client function as a string

The only other thing that I can think of is if you don't have two-factor
authentication turned on, try turning it on.

The only way I can offer you more help is if you somehow dump the packets
you send and receive. But since it's over ssl, you'll have to decrypt them
somehow.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-17899480
.

@korylprince
Copy link
Owner

I was just making sure you weren't doing the number as an integer, i.e. without the quotes.

I'm not sure what else could be happening.
Is
https://accounts.google.com/b/0/IssuedAuthSubTokens?hide_authsub=1
where you created the password? And does it show it as being "last used"?

As one last guess, it could be something with your username. Does your gmail username have a period in it? Or have Caps in it?

I've seen google do some weird stuff sometimes with logins.

Since the error is 500, is would seem that it is something failing on their end.

Unless you give me credentials to test with, or a packet dump, I'm not sure what else I can do because I can't replicate your issue.

@jgrimble
Copy link

korlprince, did you guys determine the source of the error on this thread? I am running into the same issue...

When I enter the username and the one time use password, I get this as a response....
Traceback (most recent call last):
File "get_auth.py", line 6, in
client.validate_credentials()
File "/home/pi/pygvoicelib/pygvoicelib.py", line 257, in validate_credentials
self.get_auth_url(None)
File "/home/pi/pygvoicelib/pygvoicelib.py", line 207, in get_auth_url
self._get_auth_token()
File "/home/pi/pygvoicelib/pygvoicelib.py", line 137, in _get_auth_token
raise LoginError('unknown', "HTTP Error %d" % (err_code))
pygvoicelib.LoginError: ('unknown', 'HTTP Error 404')

@korylprince
Copy link
Owner

@jgrimble See Issue #7.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants