How to change authentication type for scripted rest api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2023 04:40 AM
We have a requirement to use OAuth mechanism in our application. Currently the Scripted REST Resource is using Basic Auth(username and password). How to change the authorization type to OAuth I didn't get the option to change it. Any documents and steps like how to change the authorization type and where we need to change it. Any step by step methods to achieve the above scenario?
Regards,
Aishwarya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2023 04:43 AM
@Ankur Bawiskar How to achieve the above scenario in scripted rest api. Any documents or steps?
Regards,
Aishwarya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2023 07:38 PM
no direct way but this link has the solution to enforce OAuth is used while consuming Scripted REST API
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2023 08:08 PM
By default the Scripted Rest api end points are taking BasicAuth(username and password). Is there a way to change the Authorization method to OAuth in scripted rest api end point?
currently it looks like below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2023 08:21 PM
you cannot force it in endpoint
The link I shared has solution where you need to use script inside scripted rest api and inform 3rd party to use OAuth
Did you check that?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader