Legacy Dev Forum Posts

 View Only

Sign Up

No authentication bearer token specified in authorization header

  • 1.  No authentication bearer token specified in authorization header

    Posted 06-05-2025 19:22

    sureshu | 2022-05-02 18:01:23 UTC | #1

    Dear Team,

    We are doing a POC for business case, where Email comes to NA region Org and transfer to EMEA Org. As per Genesys this can be done through Webservice data actions.

    I am able to generate token to connect EMEA Org, but when I call API to create Email Conversation I am getting below error. Could you please help ?

    Request:

    {

    "requestUrlTemplate": "https://api.mypurecloud.de/api/v2/conversations/emails",

    "requestType": "POST",

    "headers": {

    "Authorization": "bearer ${input.token}",

    "Content-Type": "application/json"

    },

    "requestTemplate": "{\n\"flowId\": \"${input.flowId}\",\n\"provider\": \"${input.provider}\",\n\"subject\": \"$!{input.subject}\",\n\"fromName\": \"$!{input.fromName}\",\n\"fromAddress\": \"$!{input.fromAddress}\",\n\"attributes\": {\n\"$!{input.attribute1Name}\": \"$!{input.attribute1Value}\",\n\"$!{input.attribute2Name}\": \"$!{input.attribute2Value}\",\n\"$!{input.attribute3Name}\": \"$!{input.attribute3Value}\",\n\"$!{input.attribute4Name}\": \"$!{input.attribute4Value}\",\n\"$!{input.attribute5Name}\": \"$!{input.attribute5Value}\"\n}\n}"

    }

    Error Response:

    "message": "No authentication bearer token specified in authorization header.",

    Note : I am using Webservice integration with Basic authentication (client and secret key from EMEA Org). Same integration using for email conversation creation on EMEA Org.

    Token Generation Data action which is able to generate Token:

    { "requestUrlTemplate": "https://login.mypurecloud.de/oauth/token", "requestType": "POST", "headers": { "Authorization": "Basic $encoding.base64(\"${credentials.Username}:${credentials.Password}\")", "Content-Type": "application/x-www-form-urlencoded" }, "requestTemplate": "granttype=clientcredentials" }


    Jason_Mathison | 2022-05-02 18:35:08 UTC | #2

    Typically if you are calling a Genesys Cloud endpoint, you would use the "Genesys Cloud Data Action" which would take care of setting up authentication for you:

    https://help.mypurecloud.com/articles/about-genesys-cloud-data-actions-integration/

    See if using that instead resolves this for you. --Jason


    sureshu | 2022-05-02 19:46:15 UTC | #3

    Hi Jason,

    Thanks for your reply. We can't call Genesys Cloud data actions between different REGIONS (here it is US East and Farnkfurt). So I got suggested to use "Web Service data actions".

    I am able to generate token of other org which is Frankfurt but not able to call actual api using token. Could you please help ?


    sureshu | 2022-05-02 20:38:38 UTC | #4

    Hi Jason,

    I am able to resolve this using Oauth. Please close it. Thanks..!!


    system | 2022-06-02 20:38:54 UTC | #5

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