Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/24/2024 06:30 AM
We have configured the REST connector for the Coconut application and configured a security system, an endpoint, and an application data import job to import accounts from the application.
We used the following JSON:
connection Json:
{
"authentications": {
"acctAuth": {
"authType": "API Key",
"url": "https://##############.coconutcalendar.com/auth/token",
"httpMethod": "POST",
"httpParams": {
"api_key": "####################",
"api_secret": "##################"
},
"httpHeaders": {
"contentType": "application/json",
"Accept": "application/json"
},
"httpContentType": "application/json",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken"
],
"retryFailureStatusCode": [
401
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer abcd"
}
}
}
Account Import JSON:
{
"accountParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"statusAndThresholdConfig":{
"statusColumn":"customproperty4",
"activeStatus":[
"true"
],
"deleteLinks":false,
"accountThresholdValue":2000,
"correlateInactiveAccounts":true,
"inactivateAccountsNotInFile":false,
"deleteAccEntForActiveAccounts":true
},
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url":"https://######################.coconutcalendar.com/api/v2/users",
"httpHeaders":{
"Authorization":"${access_token}",
"Content-Type":"application/json",
"Accept":"application/json"
},
"httpContentType":"application/json",
"httpMethod":"GET"
},
"statusConfig":{
"active":"true",
"active":"false"
},
"listField":"data",
"keyField":"accountID",
"colsToPropsMap":{
"accountID":"id~#~char",
"name":"attributes.username~#~char",
"status":"attributes.Active~#~char",
"customproperty1":"attributes.first_name~#~char",
"customproperty2":"attributes.last_name~#~char",
"displayName":"attributes.name~#~char",
"customproperty4":"attributes.Active~#~char"
}
}
}
}
}
When we run the application data import job, we encounter the following issue:
2024-04-24T18:10:48+05:30-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-9-tm6tp-DEBUG-Got Webservice API Response: [headers:[Date: Wed, 24 Apr 2024 12:40:48 GMT, Content-Type: application/json, Transfer-Encoding: chunked, Connection: keep-alive, Cache-Control: no-cache, private, X-RateLimit-Limit: 10000, X-RateLimit-Remaining: 9983, X-XSS-Protection: 0, Strict-Transport-Security: max-age=31536000], responseText:{"errors":[{"title":"Invalid Request","detail":"Invalid access token provided"}]}, cookies:[], statusCode:401]
Can you please guide us on how we can resolve this issue?
04/24/2024 07:08 AM
@PratikPokale can you it is working in postman? token is correct?
04/24/2024 08:23 AM
Postman is working fine. The token is not static, we are generating it every time by passing the api_key and api_secret in the body of the postman.
Thank you.
04/24/2024 09:56 AM
Please share curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
04/24/2024 11:22 PM
Please find the below CURL URL for Connection:
curl --location 'https://{Domain}.coconutcalendar.com/auth/token' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{"api_key": "#######################", "api_secret": "######################"}'
04/25/2024 09:32 PM
try below connection JSON