quick question about cxone client_credentials grant. my deno edge function hits /v2/oauth/token but gets a 401. here is the fetch call:
const res = await fetch('https://api.mynice.com/v2/oauth/token', {
method: 'POST',
headers: { 'Authorization': 'Basic ' + btoa(clientId + ':' + clientSecret) },
body: new URLSearchParams({ grant_type: 'client_credentials' })
});
response body says invalid_grant. am i encoding the credentials wrong or is the endpoint path different for cxone vs gc?