and more in a single search tool across platforms. Read the announcement here. |
03/24/2024 11:49 PM - last edited on 03/25/2024 12:09 AM by Sunil
Hi Team,
I am using REST connector for an application integration. If I pass the token which I get in postman response, it's working till 5min and then it's failing after the token expires. However, I need to pass the token for every 5 mins
Here is my connection Json and postman response.
Please do let me know what I am missing.
Connection Json :
{
"authentications": {
"authenticationTokenFromConnectionJSON": {
"authType": "oauth2",
"url": "https://*******",
"httpMethod": "POST",
"httpParams": {
"username": "*********",
"password": "*******",
"grant_type": "password",
"client_id": "*******",
"type": "request-body",
"client_secret": "*********"
},
"httpHeaders": {},
"httpContentType": "application/x-www-form-urlencoded",
"authError": [
"HTTP 401 Unauthorized"
],
"errorPath": "error",
"retryFailureStatusCode": [
401
],
"maxRefreshTryCount": 5,
"refreshType": "RefreshToken",
"tokenResponsePath": "access_token",
"refreshTokenResponsePath": "refreshToken",
"tokenType": "Bearer",
"accessToken": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIycVd0bEFPdURGa1Juc0ZnYi10dHFhR2tUX1VvYzNZODdmM1R0d01NRGN3In0.eyJleHAiOjE3MTEzNDI2NT",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI5MDkxZWZlOS0yNjcxLTRiNmEtYjU2Ni05MzJwiaXNzIjoiaHR0cHM6Ly90ZXN0LW5vdi1henVyZS5lYy5zaGVsbC5jb20vYXV0aC9yZWFsbXMvZW5lcmd5eCIsImF1ZCI6Imh0dHBzOi8vdGVzdC1ub3YtYXp1cmUuZWMuc2hlbGwuY29tL2F1q4",
"testConnectionParams": {
"http": {
"url": "https://********",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"successReponse": [
200
],
"successResponsePath": "",
"errors": [
"500 Internal Server Error",
"404"
],
"errorPath": "error"
}
}
}
}
Postman Response :
and here is the logs:
Regards,
Navya Billu
03/25/2024 12:01 AM
check below resp will help
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "http://XXX",
"contentType":"application/x-www-form-urlencoded",
"httpParams": {
"grant_type": "refresh_token",
"refresh_token": "${refresh_token}"
},
"httpHeaders": {
"Authentication":"Basic ODI1NjgzNjpURVNUSU5H",
"Accept":"*/*"
},
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"Authentication_MissingOrMalformed",
"Authentication_ExpiredToken"
],
"httpMethod": "POST",
"httpContentType": "application/x-www-form-urlencoded",
"refreshType": "RefreshToken",
"refreshTokenResponsePath": "refreshToken",
"refreshToken": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI4MjU2ODM2IiwiaXNzIjoiS05PV2JpbGl0eSIsImlhdCI6MTY4OTAyMDk2OCwiZXhwIjoxNjg5MDY0MTY4LCJ0eXAiOiJyZWZyZXNoIn0.oAreMAZkST1XB7TpBliTxnCpCwC03sw3mwKtzQC_2wGwJeQNfBN6ijP_PPfRnWBCfVGLujBsT08moQsIyiPt5g",
"timeOutError": "Read timed out",
"errorPath": "error",
"maxRefreshTryCount": 1,
"authHeaderName": "Authentication",
"tokenResponsePath": "accessToken",
"tokenType": "Bearer",
"retryFailureStatusCode": [
401,403,500
],
"accessToken": "Bearer abc"
}
}
}
03/25/2024 05:31 AM - last edited on 03/25/2024 08:25 AM by Dave
Hi Raghu,
I tried with this json. If I pass the token it's working. Once the token expires getting below error. same as before no change
Regards,
Navya Billu
[This post has been edited by a Moderator to remove sensitive information.]