- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2020 04:30 AM
I'm trying to generate the access/refresh tokens using postman.
I have given Get method and provided the instance url as https://xxxxxx.service-now.com/oauth_token.do and under headers section, provided all the required key value pairs, like client id, secret, username, password and grant type.
And when I hit Send button , getting the below error,
{
"error_description": "access_denied",
"error": "server_error"
}
please help me to get the tokens.
Solved! Go to Solution.
- 10,903 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2020 04:41 AM
I have written a blog for this
Please refer the same and do remember to mark it as helpful and also bookmark if that helps
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
‎12-28-2020 07:11 AM
From Servicenow, I'm using Rest Message and adding the OAuth 2.0 as Authentication and adding the profile which I have created using the Provider instance client id and client secret. And I'm getting the token from the Rest message using 'Get Auth Token' and I'm giving simple user details to get the token and it is generating the token and able to test from default Get HTTP Method successfully with 200 response. Not using admin user to generate token here. But when I try to get token from postman, getting issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2020 07:21 AM
Hi,
I believe you are getting confused
REST Message is configured when you wish to consume 3rd party endpoint
But your question talks about getting access token generated by ServiceNow
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
‎12-28-2020 10:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2020 01:04 AM
Hi,
So here is an example
1) ServiceNow is the provider of REST API and wants 3rd party to use OAuth to access it's endpoint
Another example
2) ServiceNow is the consumer of REST API given by 3rd party so you will have to create REST Message to consume their endpoint and use OAuth if 3rd party has shared the details for the same
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
‎12-29-2020 02:05 AM