OAuth authorization code grant flow : Access Denied Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-17-2021 07:19 AM
Getting access denied while getting access token and refresh token from the authorization code. Please check the attached screenshot, need help if I need to enable any permissions.
No issue in getting the authorization code, the only problem is while getting the access token and refresh token using the authorization code.
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-17-2021 08:11 AM
Hi,
To generate access token and refresh token you have to use oauth_auth.do. oauth_token.do is to generate access token using refresh token.
I suggest you to use authorization tab under the url to generate token. Fill the details under Authorization as mentioned below and click "Get New Access Token" button. You'll be prompted for User Id and password. After passing it, Post man will display Refresh token and Access token in the screen. Refresh token can be used for future access token generation.
Type - OAuth2.0
Right side you will see Configure New Token. It will list options for token generation under this
Token Name - Any name
Grant Type - Authorization Code
Call back URL - https://www.getpostman.com/oauth2/callback
Auth URL - https://<your instance>.service-now.com/oauth_auth.do
Access Token URL - https://<your instance>.service-now.com/oauth_token.do
Client ID - Your client id
Client Secret - Your client secret
Scope - useraccount
State - state
Client Authentication - Send as Basic Auth Header
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-17-2021 08:45 AM
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-23-2021 09:50 PM
Hi,
Thanks for the steps. I did follow them but i am getting "Missing redirect URL in application registration." when i try to get new access token.
Pls guide

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-23-2021 10:42 PM
If you are testing via Postman then you can use https://www.getpostman.com/oauth2/callback as redirect url.
Thank you,
Palani
Palani