- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2020 07:59 PM
Hi,
I have created the external client oAuth access token through https://<instance>.service-now.com/oauth_token.do.
How do i use this access token in scripted REST api script for authentication ?
Regards,
Sagaya.
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2020 03:22 AM
Glad to know that it worked.
Please close the thread as answered by marking my response as correct and helpful If I was able to help/guide you.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2020 02:45 AM
Hi Ankur,
Thank you for your help and support ..
Cause of the issue :
1. Space issue in certificate
2.oAuth does not work if call another API in the scripted REST API script.
Now its working as expected .
Regards,
Sagaya Rajan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2020 02:52 AM
Hi Sagaya,
So correct me if I am wrong
It worked well after making these changes
1) updating space in the certificate
2) you were calling another 3rd party API from Scripted REST API
a) Application ABC is consuming your scripted rest API endpoint using OAuth
b) inside the scripted REST script you are making REST Call to another 3rd party application DEF
Please provide some details so that it would be helpful to other community members as well.
If you think my response helped you feel free to mark answer as correct & helpful.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2020 08:50 AM
Hi Ankur,
Please find the below details
It worked well after making these changes
1) updating space in the certificate
2) In the Scripted REST API I have used the couple of table API which is process the table in the same instance and oAuthwas not working .
Have changed the code from Table API to 'GlideRecord' and oAuth working now.
Regards,
Sagaya Rajan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2020 03:22 AM
Glad to know that it worked.
Please close the thread as answered by marking my response as correct and helpful If I was able to help/guide you.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2020 03:36 AM
Hi Ankur,
Thank you for you help and support.
Regards,
Sagaya Rajan.