- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 12:24 AM
Hi Team,
I'm new to OAuth 2.0. I'm currently working on configuring OAuth token with our external vendor who uses Zendesk tool and is provider for OAuth token. The did setup and using the provided client-id and client secrate and other details we did setup at our end also with the provided details in Application regiestroy and created one custom script based on OAuthUtil. Tried getting token it's reching the zendesk side but receiving HTTP error 401 - unauthorized error. Tried finding what is the issue here but not able to find it. Any help appriciated.
Custom Util Script
Let me know if you require any more details.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 05:52 AM - edited 05-17-2024 05:56 AM
@AkashYen007 401 indicates its authorization error.
Non-admins will not be able to retrieve the details:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0783632
Create a Zendesk OAuth client :
Also did you try to change the Send credentials as "In Request Body" and test it. If so what was the result?
I have come cross the same issue and I had to re-enter the client secret and it worked.
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 08:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 02:20 AM
@AkashYen007 Please the refer the article posted below for the OAuth configurations for the 401 error which might be helpful,
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 02:29 AM
Hi @Sujatha V M ,
Thanks for the article but the detailed error I'm getting when saw logs in
"Content Body: {"message":"Server could not parse JSON","error":"Unprocessable Entity"}".
any help for this issue?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 03:33 AM
@AkashYen007 Could you please reconfirm this send credentials as it shows basic authorization header?
Can you change it to "In Request Body" and try it?
Also see this reference link : https://www.servicenow.com/community/developer-forum/help-with-json-problem/m-p/1986812
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 03:37 AM
Yes it's set As Basic Authorization Header