09/20/2023 05:43 AM
Hi,
Can someone please share an example (working) OAuth based connectionJSON for ServiceNow as a ticketing system.
Best Regards,
Varun
Solved! Go to Solution.
09/20/2023 08:52 AM
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>" }
}
}
09/20/2023 12:54 PM
09/20/2023 09:39 PM
Please refer below links to Enable OAuth with inbound REST
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0778194
09/24/2023 11:11 PM
09/25/2023 02:52 AM
Hello @SumathiSomala ,
Yes, the provided connectionJSON is working. Thanks for your support.
Best Regards,
Varun