Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

REST API - Connection JSON with Body as Raw

rushikeshvartak
All-Star
All-Star

We having application where parameters needs to be sent as raw as show in below screenshot

rushikeshvartak_0-1706845501148.png

Current Connection JSON which is not working i.e. not generating token

Spoiler
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"url": "https://masked.com/as/token.oauth2",
"httpMethod": "POST",
"httpParams": "client_id=aaaaa&client_secret=ssssss&grant_type=client_credentials&scope=proxywrite",
"httpHeaders": {
"Content-Type": "application/x-www-form-urlencoded"
},
"httpContentType": "application/x-www-form-urlencoded",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"Must authenticate to access this API."
],
"retryFailureStatusCode": [
401,
403
],
"errorPath": "error.message",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "Bearer abcd"
}
}
}

@Shreya-B 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.
5 REPLIES 5

AmitM
Valued Contributor
Valued Contributor

Hi @rushikeshvartak @Shreya-B ,

Can you try "Content-type","text/plain" in http headers instead application/x-www-form-urlencoded.

Good Luck!!

Best Regards,

Amit

 

It does not work if you had such application with working json please share


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak 

What is the header you are passing in the postman? It should be same in the connection JSON irrespective of how you pass in the httpparams. If you pass the same it should work.

Regards,

Dhruv Sharma

"Content-Type": "application/x-www-form-urlencoded" is used in postman as well as connector but its not working


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

We have fixed issue.

Root cause , httpParams should be sent in JSON and key value params

rushikeshvartak_1-1707200646226.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.