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