I am trying to build a web service that can make an outbound call through the Genesys conversation API.
I have tried using the Client Credential Grant, but it doesn't work. The API returned a message that it requires a user context & client credential can't be used for the request.
As you pointed, only Genesys Cloud users (with an associated phone) can place a call.
Credentials/Access token for a user is only available with Implicit Grant, Authorization Code Grant, SAML2 Bearer Grant and PKCE Grant flows. Username and password can't be sent as a url params.
SAML2 Bearer Grant is available is you have enabled and configured Single Sign-On between Genesys Cloud and one of the supported 3rd party identity providers.
You would get/request the SAML assertion from the identity provider.
If your Genesys Cloud environment is not leveraging SSO and a 3rd party IdP (Okta, OneLogin, ...), then you cannot leverage SAML2 Bearer Grant flow.
If you have configured SSO, then you'll need to check on the Identity provider documentation how to get/generate a SAML assertion.
We use Azure as the SSO Provider. Do you have any reference how to get the SAML assertion? I've tried to find one, but couldn't find it. All I can find is the SAML certificate, can i use it as the assertion?
Sorry but I don't have experience/expertise with SAML and Azure Directory.
But no, I don't think the certificate is the same as the assertion. I think SAML assertion if what you get after going on the Azure AD login and getting a POST to an app with the SAML assertion.
These posts are old but they may help you - there are some explanations, the old sample and the link to technet doc.
See post 1 and post 2
There may be other posts on the forum related to this - but just stopped after these 2.