Hi Team,
We are new to Genesys world. When we try to generate a client credential token with 'purecloud-platform-client-v2' , the below error is throwing. We double checked the client id and client secret but it is correct. So, please help us to identify what we missed here
data: {
error: 'invalid_client',
description: 'client not found',
error_description: 'client not found'
}
The javascript code we are using is
const platformClient = require('purecloud-platform-client-v2');
const client = platformClient.ApiClient.instance;
// Create API instance
var authorizationApi = new platformClient.AuthorizationApi();
client.loginClientCredentialsGrant("client_id","client_secret")
.then(() => {
// Make request to GET /api/v2/authorization/permissions
return authorizationApi.getAuthorizationPermissions();
})
.then((permissions) => {
// Handle successful result
console.log(permissions);
})
.catch((err) => {
// Handle failure response
console.log(err);
});