CXone API client_credentials grant returning 401 despite valid client_id and secret

Hey everyone, I’m trying to set up a service-to-service authentication flow for our CXone integration using the client_credentials grant type, but I keep hitting a wall with a 401 Unauthorized error. We’ve been using the resource owner password credentials grant in our test environments for a while now, but production security policies require us to move to client credentials for our backend automation tools.

I’m making the request directly to the CXone OAuth endpoint. Here’s the curl command I’m running to debug the issue locally:

curl -X POST https://api.nice.incontact.com/oauth2/token \
 -H 'Content-Type: application/x-www-form-urlencoded' \
 -d 'grant_type=client_credentials&client_id=my_client_id_here&client_secret=my_client_secret_here'

The response I get back is pretty standard for auth failures:

{
 "error": "invalid_client",
 "error_description": "Client authentication failed"
}

I’ve double-checked the client ID and secret in the CXone developer console, and they definitely match what I’m using in the request. I’ve also verified that the client application has the correct permissions assigned for the scopes I need. I’m wondering if there’s something specific about the CXone implementation of the OAuth2 spec that I’m missing, or if there’s a specific header or parameter that’s required for this grant type that isn’t documented clearly.

I’ve tried adding the scope parameter explicitly, but that didn’t change the outcome. I’ve also confirmed that the client application is active and not suspended. Any ideas on what might be causing this authentication failure? I’ve been staring at this for a couple of hours now and can’t seem to find the issue. It’s probably something simple, but I’ve checked the obvious stuff multiple times.