Custom Action Authentication
Hi All,
I am trying to make a third party API call via custom action. I added the required authentication details and the test authentication is successful as in the below screenshot. Below is the Authentication payload used
{
"type": "customAuthorization",
"authorizationType": "Bearer",
"endpoint": "//url//",
"method": "POST",
"headers": {},
"body": {
"bodyType": "form",
"bodyParams": {
"grant_type": "client_credentials",
"client_id": "//client_id//",
"client_secret": "//client_secret",
"scope": "//scope//"
}
},
"tokenInResponse": "response",
"cacheDuration": {
"duration": 1,
"timeUnit": "hours"
}
}

But once I add this custom action into a journey it is throwing me HTTP 500 error like below

Error: HTTP 500
Message: can't call url <endpoint url> . HTTP protocol violation. Authentication challenge without WWW-Authenticate Header.
Also observed that once I added the custom action to the very first journey, I see the same issue but it got resolved by itself after after a couple of days and started working fine without any error. Now I am trying to add the same custom action with no changes into a different journey, and I see this issue again.
Since we are using authenticationType - Bearer, this will add Authentication header to the api call, and is it needed to add it again in the api header ?
Any help on the root cause of this issue ?