Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot validate response #44

Open
69sparrow69 opened this issue Jul 7, 2017 · 8 comments
Open

Cannot validate response #44

69sparrow69 opened this issue Jul 7, 2017 · 8 comments

Comments

@69sparrow69
Copy link

I can only call from my Google Voice. I cannot send text messages since I have not selected any phone number to use.

My code:

from googlevoice import Voice
from googlevoice.util import input

voice = Voice()
voice.login()

outgoingNumber = input('Number to call: ')
forwardingNumber = input('Number to call from [optional]: ') or None

voice.call(outgoingNumber, forwardingNumber)

if input('Calling now... cancel?[y/N] ').lower() == 'y':
    voice.cancel(outgoingNumber, forwardingNumber)

My error:

Traceback (most recent call last):
  File "callMeMaybe.py", line 10, in <module>
    voice.call(outgoingNumber, forwardingNumber)
  File "C:\Python27\lib\site-packages\googlevoice\voice.py", line 155, in call
    'phoneType': phoneType
  File "C:\Python27\lib\site-packages\googlevoice\voice.py", line 287, in __validate_special_page
    load_and_validate(self.__do_special_page(page, data))
  File "C:\Python27\lib\site-packages\googlevoice\util.py", line 65, in load_and_validate
    validate_response(loads(response.read()))
  File "C:\Python27\lib\site-packages\googlevoice\util.py", line 59, in validate_response
    raise ValidationError('There was a problem with GV: %s' % response)
googlevoice.util.ValidationError: There was a problem with GV: {'data': {'code': 1}, 'ok': False}

Thank you.

@chris001
Copy link

chris001 commented Jul 7, 2017

You're saying you're trying to send sms from code and it doesn't work?
What code are you using?
What happens when you try this code?

from googlevoice import Voice
from googlevoice.util import input

voice = Voice()
voice.login()

phoneNumber = input('Number to send message to: ')
text = input('Message text: ')

voice.send_sms(phoneNumber, text)

@69sparrow69
Copy link
Author

69sparrow69 commented Jul 7, 2017

Hello Chris,

I can't send SMS because I am in Canada.
I am using the code from my first code block and when I do, I get the error in my second code block.
When I run your code, I put in my phone number with the +1. And I get this error:

Traceback (most recent call last):
  File "textMeMaybe.py", line 10, in <module>
    voice.send_sms(phoneNumber, text)
  File "C:\Python27\lib\site-packages\googlevoice\voice.py", line 190, in send_sms
    self.__validate_special_page('sms', {'phoneNumber': phoneNumber, 'text': text})
  File "C:\Python27\lib\site-packages\googlevoice\voice.py", line 287, in __validate_special_page
    load_and_validate(self.__do_special_page(page, data))
  File "C:\Python27\lib\site-packages\googlevoice\util.py", line 65, in load_and_validate
    validate_response(loads(response.read()))
  File "C:\Python27\lib\site-packages\googlevoice\util.py", line 59, in validate_response
    raise ValidationError('There was a problem with GV: %s' % response)
googlevoice.util.ValidationError: There was a problem with GV: {'data': {'code': 2046}, 'ok': False}

Thanks.

This was referenced Jul 8, 2017
@chris001
Copy link

@HackerQuaker

  • Are you saying that GV will refuse to send an SMS from you because it can detect your computer's geographical location? What's the exact error message it gives indicating this?
  • Does your GV phone number have a US area code?
  • Is your number to call US or Canadian?
  • Is your number to call from US or Canadian?
  • Is your number to send message to US or Canadian?

@69sparrow69
Copy link
Author

@chris001

image

  • I was under the impression that I can make calls without a GV number, but to send text messages, I would need a GV number. When I try to register a US GV number with my Canadian Number, I am told that GV is only open to US users. Maybe I should open a Gmail account with a US VPN server, use a US number to verify myself and then pick a US number. But then, would I have to connect through the VPN every time I use the script?

image

image

  • It's weird. I am able to add a number using a US phone number with my CA IP. But then the process gets halted after I verify the code they send to my US phone number. So when I go the SMS option on GV, they ask me to sign up for a US phone number . . . . .Should I select one of these numbers for the "number to call from" in the settings.py?

  • Number to call is CA.

  • Number to send message to is CA.

Thank you, Chris.

@chris001
Copy link

@HackerQuaker
The way GV works is, GV will assign you a US phone number, but only if you pass the verification step, where GV sends a SMS message (or voice call with robot voice) with a verification code, to your US mobile or landline number. So if you're in Canada, you could only sign up for GV if you have a US mobile or landline number available one time for the GV verification step.

@69sparrow69
Copy link
Author

69sparrow69 commented Jul 12, 2017

@chris001
I have an app with a US phone number. I put in the verification code, but then after I get the number, I am asked to get the GV number again. Very confusing. Do you know why I got the initial error messages?

Are you aware of what those functions do?

@chris001
Copy link

chris001 commented Jul 13, 2017

@HackerQuaker
I'm relatively certain you can't use GV for calls OR texts unless you are able to successfully verify and obtain your GV phone number. So your only choice would be to first completely register thru a US VPN.

@69sparrow69
Copy link
Author

Thanks for your prompt replies dude. @chris001

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

No branches or pull requests

2 participants