Trying to get an access token for a backend service using Python requests. The docs state: ‘The client must authenticate using the client_id and client_secret in the request body.’ Here is the code:
import requests
res = requests.post('https://api.mypurecloud.com/oauth/token', data={'grant_type': 'client_credentials', 'client_id': 'xxx', 'client_secret': 'yyy'})
print(res.status_code, res.json())
Getting a 401 Unauthorized. Error is invalid_client. I’ve checked the credentials in the integration settings. They look correct. What am I missing?