Authorization: Bearer Token Help

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": {
"access_token": ".data[0].access_token" }, "translationMapDefaults": { "access_token": "\"\"" }, "successTemplate": "{ \"access_token\": {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 "client_id": "ivr",\n "client_secret": "REDACTED_HANDLE_SECRETS_LIKE_PASSWORDS",\n "email": smithavon@yahoo.com\n}"; line: 4, column: 21]",
"code": "INTERNAL_SERVER_ERROR",
"status": 500,
"messageParams": {},
"details": [],
"errors": []
}
]
}

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.

@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.

image

{
"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.REMOTE_ENDPOINT"
}
],
"errors": [
{
"message": "REST call for action execute failed. Message:Request to backend service (LONG MESSAGE CODE HERE) failed. Response from web service: {"code":"INTERNAL_SERVER_ERROR","message",
"code": "INTERNAL_SERVER_ERROR",
"status": 500,
"messageParams": {},
"details": [],
"errors": []
}
]
}

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

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

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

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