Legacy Dev Forum Posts

 View Only

Sign Up

User Defined (OAuth) getting NOT_FOUND

  • 1.  User Defined (OAuth) getting NOT_FOUND

    Posted 06-05-2025 18:42

    agilio | 2021-02-17 23:44:43 UTC | #1

    When I try to get a User defined Token with Genesys Data ACtion(Auth) I'm getting: "message": "REST call for action execute failed. Message:Request to backend service failed. Response from web service: [eb8417e3-ead9-4333-b627-94fe844a277e]", "code": "NOT_FOUND", "status": 404, "messageParams": {}, "details": [], "errors": []

    But using that same endpoint in postman everything works as expected. I've replaced the actual values with Xs for security https://login.microsoftonline.com/XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXXX/oauth2/token

    Dashes should be fine and shouldn't need any encoding. I can reach this from a browser and as I said no problem in Postman.


    Jerome.Saint-Marc | 2021-02-18 10:45:35 UTC | #2

    Hello,

    It would help to see what you have set in your Request configuration (Data Action for Auth part).

    This former post may help you - https://developer.mypurecloud.com/forum/t/custom-auth-404/7761 Postman does some processing you may not have noticed: "As an example, when you add 2 variables in "application/x-www-form-urlencoded" body, postman will do 2 things automatically. Put them in a body with "&" as separator. And if one variable contains some content like http://something/abcd, it will automatically escape it (url encoding)."

    Regards,


    Jason_Mathison | 2021-02-18 14:52:14 UTC | #3

    Hi Agilio,

    You might also look at the troubleshooting document: https://help.mypurecloud.com/articles/custom-action-fails-for-unexpected-reason/

    --Jason


    agilio | 2021-02-19 23:10:44 UTC | #4

    { "requestUrlTemplate": "https://login.microsoftonline.com/xxxxx-xxxxxxxxxxxxxxxxxxxxxxxxx/oauth2/token", "requestType": "POST", "headers": { "Authorization": "Basic $encoding.base64(\"${credentials.clientId}:${credentials.clientSecret}\")", "Content-Type": "application/x-www-form-urlencoded" }, "requestTemplate": "granttype=clientcredentials" } There is nothing going in the body that should require special treatment


    Jerome.Saint-Marc | 2021-02-20 16:32:19 UTC | #5

    Hello,

    Could you please try to add an additional header, as it is mentioned in the link that Jason shared, and in the post I referenced? Header name: "Transfer-Encoding" Header value: "buffered"

    Regards,


    agilio | 2021-02-21 15:37:03 UTC | #6

    For this particular resource in azure I was able to figure out what was needed with help/insight from this [stackoverflow article](https://stackoverflow.com/questions/56716243/postman-not-connecting-to-dynamics365-api-using-oauth-client-credentials-consol). The key to getting the token I needed to pass in my data action was to move the credentials from the header to the body and add a resource element as well. So far this looks good. Thanks for your help.


    system | 2021-03-24 15:45:58 UTC | #7

    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: 10020