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
11-07-2025 04:39 AM - edited 11-07-2025 05:00 AM
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
11-07-2025 05:12 AM
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
11-07-2025 05:18 AM
@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.