- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 08:32 AM
Post successful request for an OAuth access token, using ServiceNow REST API to review this access token's profile?:
- For what instance has this access token be authorized to access?
- What scopes are permitted when accessing this authorized instance?
- Global access to all apps within instance, or specific app within instance?
- How soon will this access token expire?
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 10:06 AM
You will need to make an HTTP GET request to the Token API, providing the access token you received during the OAuth authentication process -
GET https://<your-instance>.service-now.com/oauth_token.do?sysparm_action=get&sysparm_oauth_token=<your-access-token>
The response from this API call will contain information about the access token,
Here's a sample JSON response structure:
{
"instance_name": "your-instance-name",
"scope": "read write",
"expires_in": 3600
}
In this example, the access token is authorized for the "your-instance-name" ServiceNow instance, with "read" and "write" scopes, and it will expire in 3600 seconds (1 hour).
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Regards,
Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 10:06 AM
You will need to make an HTTP GET request to the Token API, providing the access token you received during the OAuth authentication process -
GET https://<your-instance>.service-now.com/oauth_token.do?sysparm_action=get&sysparm_oauth_token=<your-access-token>
The response from this API call will contain information about the access token,
Here's a sample JSON response structure:
{
"instance_name": "your-instance-name",
"scope": "read write",
"expires_in": 3600
}
In this example, the access token is authorized for the "your-instance-name" ServiceNow instance, with "read" and "write" scopes, and it will expire in 3600 seconds (1 hour).
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Regards,
Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2023 10:56 AM
Thank you for your reply.
Is there a way to determine the InstanceID from an accessToken without using an endpoint that requires knowing the InstanceID?