We need to setup our Genesys Cloud organization to securely consume our customer tool related API for additional details about our customers.
To access the API, we need a valid JWT token. The token is generated by using identity server. As these APIs are accessed by the machine (Genesys Cloud) so we can use the client credentials and service account with the grant type as password.
Genesys offers the User Credential (OAuth) integration definition but this automatically generates custom action for auth requests to get token with grant_type=credentials which does not fulfill our requirements and getting the token is failing with 400 error bad request as unauthorized client trying to obtain token which is obvious as we do not authorize properly with username and password and o not deliver the proper scope.
Is it possible to setup proper integration using clientId, clientSecret using grant type password so as we use service account username and password with scope definition?
I tried to setup in webservice user credentials fields the username, password, scope as well grant_type but it does not change the generated action to get the token to use proper grant type.
Our auth endpoint expects:
curl --location '$URL'
--header 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode 'client_id=genesys'
--data-urlencode 'client_secret={{genesysClientSecret}}'
--data-urlencode 'grant_type=password'
--data-urlencode 'scope=genesys'
--data-urlencode 'username={{username}}'
--data-urlencode 'password={{password}}'
and we do not know if the custom action for getting token is possible to be adjusted, because in configuration this option is grayed out to edit the data action.
Should I follow different approach, is it even possibleto use this type of authorization fo this request to get the token which I would use then in another custom action to query the customer data?
Thank you for hints