Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Getting issue with REST API Integration

skazeez0319
Tera Contributor

HI Team, 

I am getting an issue populating the an error like:

{"error":{"message":"User is not authenticated","detail":"Required to provide Auth information"},"status":"failure"}

I have provided the the auth with current credentials only still I am getting issue here, can Some one address this issue?

I am  trying to integrate with UI:
I am writing code like this:
URL:  http://dev339837.service-now.com/api/now/table/incident

const FetchingDeatils =async () => {
  try {
    const res = await fetch(url, {
      method: 'GET',
      headers: {
        'Accept': "application/json",
        'Authorization': "Basic YWRtaW46QXplZXpAMzE5"
      }
    });
    const text = await res.text();
    console.log("Getting the Job : " ,text);
  } catch (err) {
    console.error('Request failed:', err);
  }
 }



It's help full some once can address this issue here.

Thanks,
Azeez.



  

1 REPLY 1

Ankur Bawiskar
Tera Patron

@skazeez0319 

credentials are correct?

-> use https and not http

-> if your API user is for integration and SSO is enabled in your instance ensure this checkbox is true so that SSO is bypassed

AnkurBawiskar_0-1765296219827.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader