Hi guys,
We have an external API for which we are currently authenticating using an access token. This access token has an expiry duration of 1 month so we need to find a way to automatize refreshing the access token using the refresh token provided by our external party.
Using Postman we need to:
- Send a POST call to the token URL
- Set authorization type with value OAUTH.20
- Mark add authorization data to request headers
- In the body section fill in below fields:
x-www-form-urlencoded
client_id
client_secret
refresh_token
refresh_token=refresh_token
And it is working:
But in webMethods using the pub.client.http service I keep getting below response:
{
"error":"invalid_request",
"error_description":"Failed to parse request"
}
In the headers document I have Content-Type=x-www-form-urlencoded and I am using below URL:
%tokenURL%?client_id=%clientId%&client_secret=%clientSecret%&refresh_token=%refreshToken%&grant_type=refresh_token
Do you have any idea what is missing here?
Br,
n23