You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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."}'
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
The text was updated successfully, but these errors were encountered: