REST Connector - No Connection JSON Configuration required - scenario ?

IAM_99
Regular Contributor II
Regular Contributor II

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 ? 

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

You need to have connection json which is mandatory 

IAM_99
Regular Contributor II
Regular Contributor II

Okay , for our target we  have only GET api to pull accounts ( using hard coded access token),

Can you provide a dummay ConenctionJSON ?

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


Regards,
Saathvik

adriencosson
Regular Contributor II
Regular Contributor II

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>"
      }
   }
}

 

Regards,
Adrien COSSON

IAM_99
Regular Contributor II
Regular Contributor II

thank you all , we tried with this its working.

{
"authentications": {
"userAuth": {
"accessToken": ""
}
}
}