Trying to grab a token for a custom integration using the client_credentials grant. The docs say it’s straightforward, but I keep hitting a 401 Unauthorized on the /oauth/token endpoint. I’m using Postman to test the call first before moving it into the Studio script. Here’s the raw JSON payload I’m sending:
{
"grant_type": "client_credentials",
"client_id": "my_app_id",
"client_secret": "my_secret_key"
}
I’ve double-checked the credentials in the CXone portal. They match exactly. The request headers include Content-Type: application/json. The error response just says “Unauthorized” with no helpful details. Is there a specific scope I need to include in the body? The documentation is vague on this part. I’ve tried adding scope: "api" but that didn’t change anything. Any ideas on what’s missing here?