Legacy Dev Forum Posts

 View Only

Sign Up

Unable to create/start a call through a .NET service

  • 1.  Unable to create/start a call through a .NET service

    Posted 06-05-2025 18:06

    Akshay_Golash | 2021-02-17 20:16:33 UTC | #1

    Hello,

    We are building a .NET service which uses client credentials authorization grant, we are able to use UsersAPI to get list of users, etc. But when we use conversations API's 'PostConversationsCalls' method to make a call and we get an “not.a.user”,”message”:”This request requires a user context. Client credentials cannot be used for requests to this resource"

    Here is the code for reference - public CreateCallResponse InitiateCall(string userId, string phoneNumber) { var conversationApi = new ConversationsApi(); CreateCallRequest request = new CreateCallRequest() { ConversationIds = null, RoutingSkillsIds = null, LanguageId = null, CallUserId = userId, CallQueueId = null, CallFromQueueId = null, CallerIdName = null, CallerId = null, PhoneNumber = phoneNumber, Participants = null, UuiData = null }; var createCallResponse = conversationApi.PostConversationsCalls(request); return createCallResponse; } I was looking at few other posts that says we should be using Outbound API to make those kind of calls but seems like that's not supported by .NET SDK?

    Can anyone let us know how can we solve this problem? we also plan to add pause and resume recording for an ongoing call too.

    Any help or suggestion on this topic is appreciated!


    anon11147534 | 2021-02-18 10:25:11 UTC | #2

    Hi,

    APIs like the one you're trying to access require a user context. You will have to use a grant type that requires the user to authenticate with Genesys Cloud before using the application. The 3 grant types available to you are Implicit Grant, Authorization Code Grant and SAML2 Bearer Grant. You can read more about them here in Authorization Types.


    Jason_Mathison | 2021-02-18 15:02:00 UTC | #3

    Hi All,

    Data Actions have the same issue as they use a client credential. You can vote for giving Data Actions (and indirectly client credentials) the ability to manipulate conversations here: https://genesyscloud.ideas.aha.io/ideas/CLPLA-I-1082

    Or you could create a new idea with your specific use case. In practice you are going to want to follow the advice above and switch to a different credential type in order to get your feature implemented anytime soon.

    --Jason


    system | 2021-03-21 15:02:02 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 10018