Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

GCP Rest Connection

narayandas
New Contributor
New Contributor

Hi Team,

I need help on the GCP Rest Connection. Where I want to perform the delete operation.

I am facing an issue where the connection is successfully established even when I provide incorrect values for the refresh_token and client_id in the connectionJSON. However, I am unsure how to proceed.

Could you please provide guidance on how to test this GCP Rest connection.

Please find the below ConnectionJSON code.

{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://www.googleapis.com/oauth2/v4/token?",
"httpMethod": "POST",
"httpParams": {
"refresh_token": "1/Bh-NIoWnt2RSn4niVGcNHTM2sGwHYdJ4SB_hJPJb1i0",
"client_id": "<specify client id>",
"client_secret": "<specify client secret>",
"grant_type": "refresh_token"
},
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded"
},
"httpContentType": "application/x-www-form-urlencoded",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"FAILURE",
"INVALID_SESSION_ID"
],
"retryFailureStatusCode": [
401
],
"timeOutError": "Read timed out",
"errorPath": "errors.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer abcd"
}
}
}

Thanks,
Narayan Das

3 REPLIES 3

stalluri
Valued Contributor II
Valued Contributor II

@narayandas 


For the REST connector, you will need to define a testConnectionParams block in your connection JSON to be able to validate the connectivity. You can refer to the below link. 

      "testConnectionParams": {
        "http": {
          "url": "https://<domain name>/api/v2/users.json",
          "httpHeaders": {
            "Authorization": "${access_token}"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "successResponse": [],
        "successResponsePath": "",
        "errors": [
          "Couldn't authenticate you"
        ],
        "errorPath": "error"
      }

 

https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Examples-for-JSON-Construction.htm




Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

NM
Honored Contributor II
Honored Contributor II

@narayandas connection json won't actually be establishing connection when we click on save and test connection.. but it will fail when we perform actual operation.

Manu269
All-Star
All-Star

Did you validate the same via postman?

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.