I am trying to get into talkdesk Reporting API. irrespective of correct credential, it is giving me 401. I am following this document: https://docs.talkdesk.com/docs/client-credentials and I have following credential:
id='XXXXXXX'
secret='XXXXXXX'
public_key='XXXXXXX'
algorithm='XXXXXXX'
private_key='XXXXXXX'
key_id ='XXXXXXX'
import requests
consumer_key = key_id
consumer_secret = secret
username = "XXXX"
password = "XXXXX"
payload = {
'grant_type': 'password',
'client_id': consumer_key,
'client_secret': consumer_secret,
'username': username,
'password': password,
'scope':'reports:read'
}
r = requests.post("https://xxx.talkdeskid.com/oauth/token", headers={"Content-Type":"application/x-www-form-urlencoded"}, data=payload)
print(r.content)
Not sure if
password
is an option for the grant_type parameter. The documentation only mentionsclient_credentials
as an option.Code below: