Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Required to provide Auth information when trying to create an incident, but get all incidents works

LizaS
Tera Contributor

Hey, I'm trying to create an incident using the rest API 

/api/now/table/incident

Given that my user has the following roles: incident_manager, incident_manager, personalize_choices, and rest_api_explorer, I can get a list of incidents.

But when I try to create a new incident, using the same auth data, I get the following error:

{
message: 'User Not Authenticated',
detail: 'Required to provide Auth information'
}

 

I'm trying to create the incident as follows:

const response = await axios.post(endpoint, {
headers: {
'Accept': 'application/json'
},
auth: {
username,
password
},
data,
});

 

0 REPLIES 0