- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2018 02:34 AM
I configured an OAuth user to generate auth access_token & refresh_token, whenever we invoke "oauth_token.do", first time it returns both token, but when we start consuming that token to get Incident details it shows random errors. Firstly it shows "ACL" error and in a 2nd attempt, it returns blank JSON output as [].
Then if we try to hit "oauth_token.do" API again to get tokens, it also starts returning some javascript error as "This site requires JavaScript to be enabled" with entire Javascript code. (refer attached error file)
I am unable to figure out, why is this API misbehaving sometimes without any changes? Is someone faced the same issue or anyone can help me to resolve this?
Thanks in advance.
Attached the error log & images for Oauth APIs.
Regards,
Dheeraj Namdeo
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 07:22 AM
Then if we try to hit "oauth_token.do" API again to get tokens, it also starts returning some javascript error as "This site requires JavaScript to be enabled" with entire Javascript code. (refer attached error file)
I faced the exact same issue. I believe its something to do with PostMan, the initial request to obtain access_token and refresh_token works for oauth_token.do. But after we consume it, it says "This site requires JavaScript to be enabled" (with a Login Screen).
Though we get this in Post Man for testing purposes, we never got this issue in real time production environment(As they dont use PostMan)
Note:- I only saw this behavior with Grant Type of Resource Owner Password Credentials. (Or simply grant type = password)
Please mark the answer Correct/Helpful if applicable so that it will help others in future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 05:57 AM
Hi,
Can someone help here. We are still getting these errors
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 06:46 AM
Hi Dheeraj,
Did you check the life span of both access token and refresh token?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 06:56 AM
Yes, following are the values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 07:46 AM
Hi Dheeraj,
Can you check with the 3rd party whether they are getting the same error when they consume this?
Because it seems it is giving issue to you when you are consuming it either via postman or chrome rest api plugin.
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 07:22 AM
Then if we try to hit "oauth_token.do" API again to get tokens, it also starts returning some javascript error as "This site requires JavaScript to be enabled" with entire Javascript code. (refer attached error file)
I faced the exact same issue. I believe its something to do with PostMan, the initial request to obtain access_token and refresh_token works for oauth_token.do. But after we consume it, it says "This site requires JavaScript to be enabled" (with a Login Screen).
Though we get this in Post Man for testing purposes, we never got this issue in real time production environment(As they dont use PostMan)
Note:- I only saw this behavior with Grant Type of Resource Owner Password Credentials. (Or simply grant type = password)
Please mark the answer Correct/Helpful if applicable so that it will help others in future.