Info Message{"error":{"message":"User Not Authenticated","detail":"Required to provide Auth informat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 07:50 AM
Hi,
I am able to get the access and refresh token for instance-to-instance integration, but I am getting this error: (Info Message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 05:22 AM
why are you setting the property with token?
why not use that token directly?
Also in header there should be space between Bearer and access token
It should be this
Bearer ${access_token}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 10:21 PM
1.why not use that token directly?
Here my access token will expire shortly so whenever I create incident it will trigger Business rule to call script include, I need new access token. so, I am setting my refresh token in property, to get from property to generate access token in another function.
2.Bearer ${access token}?
I changed it.
3.DId I need to configure in Rest API access policies? because still i am getting the same error.
Instance A:
Instance B: (this instance providing endpoint to connect with Instance A)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 10:50 PM
you have created REST API access policies in target instance?
why to store refresh token in property?
Every time you make a call to get token use the access token directly in your next script, you need not store refresh token
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 01:10 AM
1.you have created REST API access policies in target instance?
NO
2.Kindly tell me how to configure REST API polices in target instance,
whether for Table GET API Access Policy or Table POST API Access Policy what details should be provide in REST API, REST API PATH and Resource?
-->i am selecting Table API.
is Authorization profile is correct? screenshot shared below.
3.Every time you make a call to get token use the access token directly in your next script, you need not store refresh token
--> sure, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 01:26 AM
there are 2 questions in your thread
1) why it's 401 error -> I already informed it's because of the token which you are using in 2nd API call
2) API access policy -> I haven't worked on it and haven't explored, so can't help much.
I believe I have provided solution/suggestion to your original question.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader