Hey everyone,
I’m trying to get an access token for the CXone API using the client_credentials grant type. I’ve been looking at the NICE CXone docs, and it seems straightforward enough, but I keep hitting a wall.
Here’s the curl command I’m running from my local machine in Chicago:
curl -X POST https://api.cimplicity.com/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=my_client_id&client_secret=my_secret"
The response I get back is consistently a 401 Unauthorized. The JSON payload looks like this:
{
"error": "invalid_client",
"error_description": "Client authentication failed"
}
I’ve double-checked the client ID and secret in the CXone admin console, and they look correct. I’ve even regenerated the secret just to be sure. Is there something specific about the client_credentials flow in CXone that I’m missing? Maybe a scope parameter I need to include? Or is the endpoint different for our specific org?
I’m a bit stuck here and would appreciate any pointers. I’ve been staring at this for an hour now.
Thanks in advance.