OAuth based connectionJSON for ServiceNow as a ticketing system

varunpuri
Regular Contributor
Regular Contributor

Hi,

Can someone please share an example (working) OAuth based connectionJSON for ServiceNow as a ticketing system.

Best Regards,
Varun

5 REPLIES 5

SumathiSomala
Regular Contributor III
Regular Contributor III

Hi @varunpuri 

Use below connectionJSON to create a connection using OAuth authentication type:

 

 

{

  "authentications": {

    "SNOW": {

      "authType": "oauth2",

      "url": "https://<domain name>/oauth_token.do",

      "httpParams": {

        "password": "<password>",

        "grant_type": "password",

        "scope": "useraccount",

        "client_id": "<client id>",

        "client_secret": "<client secret>",

        "username": "<username>"      },

      "httpHeaders": {

        "Content-Type": "application/x-www-form-urlencoded"      },

      "authError": [

        "InvalidAuthenticationToken"      ],

      "httpMethod": "POST",

      "httpContentType": "application/x-www-form-urlencoded",

      "errorPath": "error.code",

      "maxRefreshTryCount": 5,

      "tokenResponsePath": "access_token",

      "tokenType": "Bearer",

      "retryFailureStatusCode": [

        401

      ],

      "accessToken": "Bearer <token>"    }

  }

}

Regards,
Sumathi Somala

@Thank You, @SumathiSomala 

I'll try this and revert.

Best Regards,
Varun

SumathiSomala
Regular Contributor III
Regular Contributor III

@varunpuri is provided connection JSON working?

If yes please let me know.

Regards,
Sumathi Somala

Hello @SumathiSomala ,

Yes, the provided connectionJSON is working. Thanks for your support.

Best Regards,
Varun