Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Multiple Rest API calls

soumyabrata
New Contributor III
New Contributor III

Have similar requirement as: https://forums.saviynt.com/t5/identity-governance/multiple-rest-api-calls-in-rest-connectionjson/td-...

Where 1st call to the API gateway and 2nd call to the actual API. In 2nd call need to pass the access_token from 1st call.

So here "refreshTokenCall": {...} will be the 1st call and the response we need to pass to actual API similar to  "assertion": "${refresh_token}" ?

Can anyone share sample json if you have.

1 REPLY 1

rushikeshvartak
All-Star
All-Star

You can refer  Renew Access Token and Refresh Token using Different API in developer handbooks.
For Ref: https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm 

 

{
  "authentications": {
    "userAuth": {
      "authType": "oauth2",
      "url": "https://<domain name>/oauth/token",
      "httpMethod": "POST",
      "httpParams": {
        "company_id": "<>",
        "client_id": "<>",
        "grant_type": "<>",
        "assertion": "${refresh_token}"
      },
      "httpHeaders": {
        "Content-Type": "application/x-www-form-urlencoded"
      },
      "httpContentType": "application/x-www-form-urlencoded",
      "authError": [
        "Unable to authenticate the client",
        "Invalid OAuth token Bearer"
      ],
      "retryFailureStatusCode": [
        401
      ],
      "errorPath": "",
      "maxRefreshTryCount": 5,
      "tokenResponsePath": "access_token",
      "refreshType": "RefreshToken",
      "tokenType": "Bearer",
      "accessToken": "Bearer asdsdfghjk",
      "refreshToken": "<>",
      "refreshTokenAuthError": [
        "Unable to retrieve SAML assertion",
        "The provided SAML assertion is expired"
      ],
      "refreshTokenErrorPath": "errorMessage",
      "refreshTokenCall": {
        "refreshTokenResponsePath": "",
        "url": "https://<domain name>/oauth",
        "httpMethod": "POST",
        "httpParams": {
          "client_id": "<>",
          "user_id": "<>",
          "token_url": "https://<domain name>/oauth/token",
          "private_key": "<>"
        },
        "httpHeaders": {
          "Content-Type": "application/x-www-form-urlencoded"
        },
        "httpContentType": "application/x-www-form-urlencoded"
      }
    }
  }
}

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.