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

access_token is not picking dynamically in REST connection

pradeepv
New Contributor III
New Contributor III

Hi,

I am working on REST integration where access_token is not picking dynamically in other jsons like create and addaccess json.

PFA for the postman calls, Saviynt jsons and logs

Your help is highly appreciated! thanks in advance

9 REPLIES 9

rushikeshvartak
All-Star
All-Star

{
"authentications": {
"userAuth": {
"authType": "oauth2",
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded"
},
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"FAILURE",
"INVALID_SESSION_ID"
],
"url": "https://apple.marketingcloudapis.com/v2/token",
"httpMethod": "POST",
"httpContentType": "application/x-www-form-urlencoded",
"errorPath": "errors.message",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",

"accessToken":"Bearer Abcd",

"httpParams": {
"refresh_token": "${refresh_token}",
"clientId": "Abc",
"clientSecret": "123"
},
"retryFailureStatusCode": [
401,
403,
500
]
}
}
}


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

pradeepv
New Contributor III
New Contributor III

Hi @rushikeshvartak 

Thanks for the response appreciated!

1. what is the value for abcd?
"accessToken":"Bearer Abcd",

2. Application team has not shared the "refresh" token.

Regards


Its dummy value


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

pradeepv
New Contributor III
New Contributor III

I mean do I need to get that value from application team or need to call the access_token value from the response?

Like in postman call under the Authorization there is an option.

pradeepv_0-1713496356859.png

Thanks

U can put token from response one time


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

Thanks again.

Hope you are saying in postman. 
Can you please tell me what I can place in the saviynt connection json 

"accessToken":"Bearer access_token",
something like that?




COnn JSON


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

pradeepv
New Contributor III
New Contributor III

Hi @rushikeshvartak 

Thanks for the inputs, still having some challenge, I don't have REFRESH TOKEN.
granttype - Client_crendentials.

Can the json in the attachment will work?

[This message has been edited by moderator to mask url from an attachment]

{
"authentications": {
"userAuth": {
"authType": "oauth2",
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded"
},
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"FAILURE",
"INVALID_SESSION_ID"
],
"url": "xxxxxxxxxxxxxxxxxxxx/v2/token",
"httpMethod": "POST",
"httpContentType": "application/x-www-form-urlencoded",
"errorPath": "errors.message",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"token_type": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "Bearer abcd",
"httpParams": {
"grant_type": "client_credentials",
"client_id": "123",
"client_secret": "abc"
},
"retryFailureStatusCode": [
401,
403,
500
]
}
}
}


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