Using /api/v2/conversations/calls with .NET SDK

Hi,

We want to use this API on our .NET project;

Since we are using our OAuth's client ID and client secret, we are not allowed to use it and seeing this error on response:
{
"message": "This request requires a user context. Client credentials cannot be used for requests to this resource.",
"code": "not.a.user",
"status": 400,
"contextId": "22c14afd-c570-461b-aeaa-6667b9228280",
"details": [],
"errors": []
}

The reason is clear and understandable in the response message, but this is a crucial part of our project and we'd like to know if it's possible to call this API, using .NET SDK.

Any help would be appreciated,

Regards,

İbrahim

Hi Ibrahim,

This has nothing to do with the .NET SDK but rather the API endpoint. The API requires a user context (e.g. from a user logged in with a method other than the OAuth Client credential grant.). I recommend you look at our Ideas portal and register for the request. The product manager for the service in question looks at these requests and then works with the internal development teams to evaluate them.

Here is the link to our Ideas portal: Genesys Cloud Ideas Portal

Thanks,
John Carnell
Director, Developer Engagement

Hi, thank you. Actually I know what you said, the reason why I opened this case is to see if there is any other way to use this API, and other APIs that requires user context, in .NET with authorization other than client credentials. Is it possible to use OAuth types such as Code Authorization, Token Implicit Grant or SAML2 Bearer?

I'm not sure if my question is relevant and sorry if it's not. Since this API is crucial to be used in our CRM, I'm trying to find a solution.

Regards,

İbrahim

Hi Ibrahim,

Take a look at our README for .NET SDK. platform-client-sdk-dotnet/build at master · MyPureCloud/platform-client-sdk-dotnet · GitHub

We provide examples of how to connect using an implicit grant. Once you have authenticated you need to set the Configuration.AccessToken field on the APIClient and you should be good to go. The implicit grant does require a callback URL in your application that Genesys Cloud can call back into with the auth token once you have authenticated with Genesys.

You should be good to go because three other authentication mechanisms (Code Authorization, Token Implicit Grant or SAML2 Bearer) all provide a user-context on the token.,

Thanks,
John Carnell
Director, Developer Engagement

Hi,

Thank you for your response, which is very helpful for us. I saw this one while checking Git sources from Genesys;

It's exactly what we were looking for and we solved our problem, click-to-call works flawlessly from our client's CRM.

Thank you very much for helping us, really appreciated.

Best regards,

İbrahim