My script keeps hitting a 403 when fetching the token. I’m using the standard endpoint with the correct client id and secret, but the response just says invalid_grant. Here’s the snippet:
import requests
resp = requests.post('https://api.mypurecloud.com/oauth/token', auth=('client_id', 'client_secret'), data={'grant_type': 'client_credentials'})
print(resp.status_code, resp.json())
The token url is definitely right. What am I missing?