Hey folks,
Trying to automate some CXone API calls using the client_credentials grant. The initial token fetch works fine, but I’m hitting a wall when the token expires. My script isn’t handling the refresh properly.
Here’s the flow:
- Fetching token from
https://api.nice-incontact.com/oauth2/token - Using the access token for
/api/v2/contacts - Getting a
401 Unauthorizedafter ~30 minutes
I’ve checked the client ID and secret. They are correct. Am I missing a step in the refresh logic?