- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2016 05:41 AM
Hi,
I am getting below error when my customer is trying to generate access token.
Error : no json object could be decoded.
this error he has sent me using screen shot, and i can't access the log lines also?
when i am trying using my servicenow account it's giving the access token.
Can any one please help me for the same.
here is my python code.
data = {}
data['client_secret'] = client_secret
data['client_id'] = client_id
data['grant_type'] = grant_type
data['username'] = username
data['password'] = password
try:
response = requests.request(method='POST', url=utility.TOKEN_URL.format(instance_name), data=data)
except requests.HTTPError as re:
_errormsg = {}
_errormsg['error_code'] = re.response.status_code
if re.response.status_code == 401:
raise Exception('Error: Either the credentials provided are invalid or {} does not have the required privileges. Please check your credentials and configuration and try again.'.format(username))
_errormsg['error_description'] = re.response.text
raise Exception(_errormsg)
response = json.loads(response.text)
return response
I think its not able to decode using json.loads, but i don't know what error it's giving , can any one help me for the same.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2016 11:08 PM
Actually your 403 error looks like an IP restriction. Check with the ServiceNow admin to see if they need to allow the IP 43.242.244.50

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2016 11:08 PM
Actually your 403 error looks like an IP restriction. Check with the ServiceNow admin to see if they need to allow the IP 43.242.244.50
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 10:07 PM