Legacy Dev Forum Posts

 View Only

Sign Up

Authorization: Bearer Token Help

  • 1.  Authorization: Bearer Token Help

    Posted 06-05-2025 18:19

    Jaime_Perez | 2021-07-01 14:19:48 UTC | #1

    Hi, @Tim, I hope you are able to help me with the below. I am trying to run a token using an email address. When I run the token in postman, it returns successful but when I run it in the data action, it is providing the below error message. Can you tell me what I am doing wrong here?

    Translation Map: { "translationMap": { "accesstoken": "$.data[0].accesstoken" }, "translationMapDefaults": { "accesstoken": "\"\"" }, "successTemplate": "{ \"accesstoken\": ${access_token} }" }

    Response ERROR: { "message": "Processing the Request Body Template resulted in invalid JSON.", "code": "internal.server.error", "status": 500, "messageParams": {}, "contextId": "ba871123-45cf-403c-a6f0-caf126b3da2d", "details": [ { "errorCode": "ACTION.PROCESSING" } ], "errors": [ { "message": "Unrecognized token 'smithavon': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n at [Source: (String)\"{\n \"clientid\": \"ivr\",\n \"clientsecret\": \"REDACTEDHANDLESECRETSLIKEPASSWORDS\",\n \"email\": smithavon@yahoo.com\n}\"; line: 4, column: 21]", "code": "INTERNALSERVERERROR", "status": 500, "messageParams": {}, "details": [], "errors": [] } ] }


    tim.smith | 2021-07-01 14:21:38 UTC | #2

    It's complaining that the string value for "email" isn't in quotes.

    Also, please regenerate your oauth client's secret as it has been compromised by posting it publicly.


    Jaime_Perez | 2021-07-01 14:35:47 UTC | #3

    @Tim, thanks for the callout. I just had the dev team update the secret. I tried adding the quotation marks but it's also failing.

    { "message": "The server encountered an unexpected condition which prevented it from fulfilling the request.", "code": "internal.server.error", "status": 500, "messageParams": {}, "contextId": "ID HERE", "details": [ { "errorCode": "ACTION.REMOTEENDPOINT" } ], "errors": [ { "message": "REST call for action execute failed. Message:Request to backend service (LONG MESSAGE CODE HERE) failed. Response from web service: {\"code\":\"INTERNALSERVERERROR\",\"message\", "code": "INTERNALSERVER_ERROR", "status": 500, "messageParams": {}, "details": [], "errors": [] } ] }


    tim.smith | 2021-07-01 14:48:32 UTC | #4

    You'll have to investigate the backend service that's servicing the request to see why it's returning a 500 error.


    Jaime_Perez | 2021-07-01 20:07:19 UTC | #5

    @Tim, I added the quotation marks in the Request Body Template and it worked.

    "email": "${input.emailAddress}"


    system | 2021-08-01 20:07:19 UTC | #6

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