Getting an error while trying to pull the data from ServiceNow into my React App using REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 08:53 PM
Hi Team,
I am trying to connect ServiceNow platform to my React app using REST API. However, I am getting error message.
Below is the piece of code for reference:
Note: I have tested the API using "Postman" and it is working fine without any issues(Credentials are correct).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 08:57 PM
can you share how you configured the REST message in ServiceNow?
Also share the scripts and screenshots.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 09:22 PM
Hi,
Thanks for responding.
I didn't configured any REST message. I am using "REST API Explorer" for checking the connectivity.
I tried with the API that is created upon clicking "Send".
Note: Able to fetch the data using Postman..
Please let me know if you need any further details.
Thankyou,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 09:52 PM
the error is http 401 -> meaning wrong user name and password combination
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 09:59 PM