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

example issue. #2

Open
fredmo opened this issue Jun 6, 2022 · 0 comments
Open

example issue. #2

fredmo opened this issue Jun 6, 2022 · 0 comments

Comments

@fredmo
Copy link

fredmo commented Jun 6, 2022

In the example,

after setting the :
SENDER_NAME = 'hst2XXXXXXX' # Name of your app in dev console
AUTH_TOKEN = 'Basic XXX==' # Authorization header from dev console

By using the current example in the python3 script on a raspberry pi :

python3 send_sms.py
Traceback (most recent call last):
File "/home/pi/send_sms.py", line 13, in
sms = utils.SMS(AUTH_TOKEN=AUTH_TOKEN, )
TypeError: init() missing 1 required positional argument: 'SENDER_NAME'

I guess the example should be modified to
sms = utils.SMS(AUTH_TOKEN=AUTH_TOKEN, SENDER_NAME =SENDER_NAME )
???

Nevertheless, after the modification I have this error :

Traceback (most recent call last):
File "/home/pi/send_sms.py", line 14, in
res = sms.send_sms(message=message,
File "/home/pi/.local/lib/python3.9/site-packages/python_orange_sms/utils.py", line 62, in send_sms
access_token = self.get_access_token()
File "/home/pi/.local/lib/python3.9/site-packages/python_orange_sms/utils.py", line 38, in get_access_token
raise Exception(f"Failed with following response: '{r.text}'")
Exception: Failed with following response: '{"error":"unauthorized_client","error_description":"The requested service needs credentials, but the ones provided were not approved."}'

On https://developer.orange.com/myapps/hst2XXXXXXX/addapi , what is the Api to allow for this module ?
I am a Orange France user.

Regards.
Frederic

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

1 participant