01-27-2023 12:15 PM - edited 01-27-2023 12:20 PM
Hi Team,
We have unexpired access_token is there ,so we dont need Connection JOSN to generate any access token ? Can we leave ConnectionJSON blank and hard code token in other places.
How to configure in this case ?
Solved! Go to Solution.
01-27-2023 12:20 PM
You need to have connection json which is mandatory
01-27-2023 12:23 PM
Okay , for our target we have only GET api to pull accounts ( using hard coded access token),
Can you provide a dummay ConenctionJSON ?
01-27-2023 12:37 PM
Add any url which will give successful 200 status code
01-27-2023 12:44 PM
You can use below format
{ "authentications": { "userAuth": { "authType": "oauth2", "url": "<URL>", "httpMethod": "POST", "httpParams": {}, "httpHeaders": { "contentType": "application/x-www-form-urlencoded" }, "httpContentType": "application/x-www-form-urlencoded", "expiryError": "ExpiredAuthenticationToken", "authError": [ "InvalidAuthenticationToken", "AuthenticationFailed", "FAILURE", "INVALID_SESSION_ID" ], "timeOutError": "Read timed out", "errorPath": "errors.type", "maxRefreshTryCount": 5, "tokenResponsePath": "sessionId", "tokenType": "Bearer", "accessToken": "Bearer <token>" } } }
https://docs.saviyntcloud.com/bundle/REST-v231/page/Content/Developers-Handbook.htm
01-27-2023 12:46 PM
You can basically use the api to get your accounts with a limit of 1 so the test connection completes quickly and use the sample below :
{
"authentications":{
"acctAuth":{
"authType":"oauth2",
"url":"https://<myapp>.domain.com/getUsers?limit=1",
"httpMethod":"GET",
"httpParams":{
},
"httpHeaders":{
},
"httpContentType":"text/html",
"authError":[
"InvalidAuthenticationToken",
"Couldn't aunthenticate you",
"AuthenticationFailed"
],
"errorPath":"error",
"retryFailureStatusCode":[
401
],
"maxRefreshTryCount":5,
"tokenType":"Bearer",
"accessToken":"Bearer <Insert Token Here>"
}
}
}
01-27-2023 12:51 PM
thank you all , we tried with this its working.
{
"authentications": {
"userAuth": {
"accessToken": ""
}
}
}