Legacy Dev Forum Posts

 View Only

Sign Up

Web Service integration with third party

  • 1.  Web Service integration with third party

    Posted 06-05-2025 18:43

    thon | 2022-08-18 06:28:13 UTC | #1

    Hello,

    We are implementing an integration with third party helpdesk tool. Help desk tool APIs are expecting the below listed fields and values as params to be sent to their auth URL and NOT as part of the headers (even client id and secret as params and not as basic auth). If I understand Genesys documentation (listed below), the fields and values defined will be sent as listed in the below configuration.

    How can I send the fields expected by the auth API as params?

    loginUrl clientId clientsecret refreshtoken granttype is refresh_token

    Please keep in mind: appfoundry integrator will not work with the product we have.

    default action created when the integration is setup has the below configuration: { "requestUrlTemplate": "${credentials.loginUrl}", "requestType": "POST", "headers": { "Authorization": "Basic $encoding.base64(\"${credentials.clientId}:${credentials.clientSecret}\")", "Content-Type": "application/x-www-form-urlencoded" }, "requestTemplate": "granttype=clientcredentials" }


    Jason_Mathison | 2022-08-17 12:38:34 UTC | #2

    Hi thon,

    For this API it sounds like you would remove the Authorization header from the configuration, and then add all of your parameters are query strings on the requestUrlTemplate, something like this:

    "requestUrlTemplate": "${credentials.loginUrl}?clientId=$esc.url(${credentials.clientId}),clientsecret=$esc.url(${credentials.clientsecret},<All other foo=bar parameters>"),

    --Jason


    thon | 2022-08-17 23:16:33 UTC | #3

    Hi Jason, Thanks for your response.

    If I understand the auth flow correctly:

    1. Create an Web Service integration which calls the oauth endpoint and gets an access token.
    2. Subsequent actions can use the above integration and call the actual APIs with authResponse.access_token (received from step1)

    My question for now is related to setup of step1. I followed step1 on this (how-to-use-the-user-defined-oauth-credential-type) page. But my issue is how do I setup an integration with params to the auth endpoint?


    thon | 2022-08-19 02:23:25 UTC | #4

    Jason, Any help and/or pointers would be greatly appreciated.


    thon | 2022-08-20 11:13:11 UTC | #6

    JasonMathison, post:2, topic:15912
    `clientId=$esc.url(${credentials.client_Id})`

    thank you Jason!


    Jason_Mathison | 2022-08-22 11:58:59 UTC | #7

    Everything working for you now?


    thon | 2022-08-22 15:59:25 UTC | #8

    Yes it is! thank you. I was initially confused on the interaction model between the auth and then the subsequent data actions. The fact that a published data action could be edited was not apparent as the toggle button to edit is not very intuitive. But once I got past that, It was all good. Appreciate all the help.


    Jason_Mathison | 2022-08-22 17:55:14 UTC | #9

    I agree that the edit toggle is confusing. I added a note to my to-do list to see if we can improve that UI.

    --Jason


    system | 2022-09-22 17:55:30 UTC | #10

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