Explanation of KB0791131 - where is the OAUTH Token used?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 04:14 AM
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0791131
In this KB we can get a Token and call the Rest Message, but where in the Rest Message the Token is used.
Is it somewhere done with the Link to the Profil?
Making an outbound REST call with the retrieved token
// make the outbound REST call with the retrieved token
var r = new sn_ws.RESTMessageV2('empukemburu03_outbound', 'Default GET');
//setting oauth profile and oauth requester profile
r.setAuthenticationProfile('oauth2', oauth_profile_id);
r.setRequestorProfile(requestor_context, requestor_id);
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
gs.log(responseBody);
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 04:59 AM
I think you can create one Rest Outbound and create Get method and try no ?
Please hit like and mark my response as correct if that helps
Regards,
Musab
Regards,
Musab