While Generating tocken Getting { "error_description":"access_denied","error":"server_error}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
No URIs provided, removing all URI matcher rules
*** Script: 401 {"error_description":"access_denied","error":"server_error"}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
401 means credential issue.
If it's working from postman then you are good, why you are concerned about the error while trying to get token within the instance?
try to update this line
token.setRequestHeader("content-type", "application/x-www-form-urlencoded");
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Ankur Bawiskar
yes your correct , but when i try with script to generate token means at the time its giving error. not sure where i did mistake
Regards,
Rajesh Gillerla.
