Postman to servicenow using OAuth 2.0
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello @21121A3359, could you please change form-data to x-www-form-urlencoded and try? Also, under Authorization should be set to None.
Regards,
Nishant
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @21121A3359
401 is authentication error.
In Postman's OAuth 2.0 configuration, find the Client Authentication dropdown.
- Recommended: Try switching between "Send as Basic Auth header" and "Send client credentials in body".
- ServiceNow typically expects credentials in the request body for the /oauth_token.do endpoint
2) In your Target system from where you've received Client ID and Secret, ensure the "Default Grant type" is set to "Client Credentials" and "OAuth Application User" as your Rest User profile with right level of API access/roles.
Refer: OAuth 2.0 Client Credentials works in Postman but not from ServiceNow-to-ServiceNow (401 error)
3)
Ensure your request is sent correctly if you are building the POST request manually:
- Header: Content-Type: application/x-www-form-urlencoded.
- Body: Ensure you are using x-www-form-urlencoded format, not raw JSON
