02/20/2023
08:40 AM
- last edited on
02/21/2023
11:48 AM
by
Dave
Hi,
We are facing issues with the connection JSON. The access token expires and hence we see the 401 error. We are able to do the same via postman via hitting the following url:
https://mash-dev.saviyntcloud.com/ECM/api/login with username and password.
Need help with the below connection JSON:
{
"authentications": {
"userAuth": {
"authType": "BasicWithAccessToken",
"url": "{url}/ECM/api/login",
"httpMethod": "POST",
"httpHeaders": {"Accept": "application/json"},
"properties": {"userName": "******","password": "*****"},
"httpContentType": "application/json",
"expiryError": "ExpiredAuthenticationToken",
"retryFailureStatusCode": [403,401,500],
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"Authentication_MissingOrMalformed",
"Authentication_ExpiredToken"
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer xyz"
}
}
}
[This post has been edited by a Moderator to remove sensitive information.]
Solved! Go to Solution.
02/20/2023 10:31 AM
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"httpHeaders": {
"Accept": "application/json"
},
"authError": [
"InvalidAuthenticationToken"
],
"url": "https://ssm-.saviyntcloud.com/ECM/api/login",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\":\"sampleusername\",\"password\":\"StrongestPassword\"}",
"errorPath": "error.code",
"maxRefreshTryCount": 2,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "Bearer ABCD",
"retryFailureStatusCode": [
401
]
}
}
}
02/21/2023 06:30 AM
Thanks Rushi, this works!