and more in a single search tool across platforms. Read the announcement here. |
11/02/2023 09:36 AM
This is regarding the rest connector.We are trying to import the accountentitlements using the REST connector. However the API has no authentication type mechanism. When we call the login API we get res response of token(custom value) in the in the header in response.we wanted to pass that token value to call the actual API by passing this header value.
{
"authentications": {
"acctAuth": {
"authType": "??",
"url": "http://<hodtname>/Authorization/login",
"httpMethod": "POST",
"httpParams": {
"ApplicationName":"Saviynt"
"apiKey": "XXXXXX",
},
"httpHeaders": {
"contentType": "application/json"
},
"httpContentType": "application/json",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"invalid credentials",
"AuthenticationFailed",
"HTTP error code : 401"
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 3,
"tokenResponsePath": "",
"tokenType": "",
"accessToken": "",
"retryFailureStatusCode": [
500,
502,
401
]
}
Here the only difference is the login url returns a custom token in the header with "secuiryheader". This needs to be passed in the actual import call.
Any suggestions?
11/03/2023 02:14 PM
You can try to define the response path which provides the token value against tokenResponsePath. And then give a dummy value for "accessToken": "",
And you should be able to use ${access_token} variable in your ImportJSON.
11/03/2023 07:27 PM
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"url": "http://<hodtname>/Authorization/login",
"httpMethod": "POST",
"httpParams": {
"ApplicationName":"Saviynt"
"apiKey": "XXXXXX",
},
"httpHeaders": {
"contentType": "application/json"
},
"httpContentType": "application/json",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"invalid credentials",
"AuthenticationFailed",
"HTTP error code : 401"
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 3,
"tokenResponsePath": "",
"tokenType": "",
"accessToken": "",
"retryFailureStatusCode": [
500,
502,
401
]
}
Can you share postman screnshot