User Not Authenticated error while using API key.

shashanksha
Tera Contributor

Created a API key with the following steps:-

1) All > System Web Services > API Access Policies > Inbound Authentication Profile.

2) Create API Key authentication profiles

3)All > System Web Services > API Access Policies > REST API Auth Parameter

4)All > System Web Services > API Access Policies > REST API Key

5)All > System Web Services > API Access Policies > REST API Access Policies

 

Follow the above steps to generate API key for Integration which will create Change Request from third party to servicenow (GET/POST). While testing the service with Postman it was giving error

"error": {
"message": "User Not Authenticated",
"detail": "Required to provide Auth information"
},
"status": "failure"
after debugging. found and deactivate "REST API Access Policies" which i have created then it is working fine. Using basic service account it is working fine but with API key and REST API Access Policies is activated it is giving error. I want a API key to integrate.
Please help me out.
 
Thanks,
Shashank Sharma
4 REPLIES 4

SwathiPedireddy
Kilo Sage

Hi @shashanksha 

Please share Rest API Access policy screenshot

 

Thanks,

Swathi

shashanksha
Tera Contributor

Hello @SwathiPedireddy ,

Please find the attachement.

shashanksha_0-1742811743816.png

 

SwathiPedireddy_1-1742822674044.png

Make sure you are using correct Parameter Name as key in postman ,verify API Key and Type should be given as 'Add to' in postman.

 

Thanks,

Swathi

shashanksha
Tera Contributor

Hello @SwathiPedireddy ,

 

shashanksha_0-1742823065476.png

Yes, i am using the correct Key in the postman.

 

Thanks,

Shashank Sharma