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 send sms with error code 2046 #5

Closed
hrGuTou opened this issue Oct 9, 2018 · 2 comments
Closed

Cannot send sms with error code 2046 #5

hrGuTou opened this issue Oct 9, 2018 · 2 comments

Comments

@hrGuTou
Copy link

hrGuTou commented Oct 9, 2018

I created a new Google account just for Google voice so no 2-step verification enabled.
I got a Gvoice number and it works fine on the web.
It seems that I can successfully login but can't send any messages.

The error code is {'ok': False, 'data': {'code': 2046}}

Traceback (most recent call last):
  File "C:\~\venv\lib\site-packages\googlevoice\util.py", line 12, in validate_response
    assert 'ok' in response and response['ok']
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/~/gvoice.py", line 14, in <module>
    voice.send_sms(out,"hi from py")
  File "C:\~\venv\lib\site-packages\googlevoice\voice.py", line 209, in send_sms
    'sms', {'phoneNumber': phoneNumber, 'text': text})
  File "C:\~\venv\lib\site-packages\googlevoice\voice.py", line 299, in __validate_special_page
    util.load_and_validate(self.__do_special_page(page, data))
  File "C:\~\venv\lib\site-packages\googlevoice\util.py", line 21, in load_and_validate
    validate_response(response.json())
  File "C:\~\venv\lib\site-packages\googlevoice\util.py", line 14, in validate_response
    raise ValidationError('There was a problem with GV: %s' % response)
googlevoice.util.ValidationError: There was a problem with GV: {'ok': False, 'data': {'code': 2046}}
@tobocop2
Copy link

tobocop2 commented Dec 25, 2018

@hrGuTou

I've noticed a similar issue specifically with group messages. I made a hack work around to send group messages by using the new google voice API. It seems that the legacy google API doesn't support some of the new features. For example, in the legacy client, I can receive group messages in the web, but I can't respond to them..so I had to implement a hack in my script and partially reverse engineer the new google voice API for that purpose.

I think that this project potentially needs an extension to support the new google voice API.

You can see my hack here:

Send SMS

I'm doing that just for group messages for now, but I'm sure that the sendsms endpoint is possibly more reliable than the legacy system.

@jaraco
Copy link
Owner

jaraco commented Dec 26, 2018

I think this issue is a duplicate of #4, which seems to be a duplicate of pettazz/googlevoice#44. I'd gladly accept pull requests to improve the situation.

@jaraco jaraco closed this as completed Dec 26, 2018
jaraco added a commit that referenced this issue May 2, 2020
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

3 participants