How to generate token url in application registry?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2022 12:43 AM
Hi All,
We need to provide a token url to the client.
How can we generate a token url?
Thanks,
Veer
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2022 12:49 AM
Hello
Use the below code to generate tokens
function dumpToken(token) {
if(token) {
gs.info("AccessToken:" + token.getAccessToken());
gs.info("AccessTokenExpiresIn:" + token.getExpiresIn());
gs.info("RefreshToken:" + token.getRefreshToken());
}
}
var oAuthClient = new sn_auth.GlideOAuthClient();
var token = oAuthClient.getToken('Request ID from the OAuth Requestor Profile', 'OAuth profile ID from the OAuth Entity Profile ');
dumpToken(token);
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2022 12:13 AM
I Hope my solution helps you, if it helps please mark my response as correct and helpful so that it will be helpful for the future readers