REST Message - 401 - Invalid username/password combo

Thiagofmeira
Kilo Guru

Hi all,

I found many topics about this problem here in the community, but none helps me.

 

 I have to create an integration and the GET, DELETE and POST method works, but when I use the PUT method to edit some users, I get an error. I got to execute the integration in many applications and other systems but only in servicenow it is not working.

I'm getting the following error

Method failed: (/ocs/v1.php/cloud/users/Thiago2) with code: 401 - Invalid user name / password

 

The user is the same user used on other methods and is working

I've already tried using authentication through a header with a base64 key

I've already passed the parameters directly in the endpoint or in the content field

I've tried different content types

I always get the same error.

 

Does anyone have a clue about what could be causing the error?

Follow below the form:

find_real_file.png

Thank you

11 REPLIES 11

sachin_namjoshi
Kilo Patron
Kilo Patron

did you tried using basic authentication for your REST API?

Also, as part of troubleshooting, call external REST API using background script and pass same credentials to check if there are any issues.

 

Regards,

Sachin

Hi sachin.namjoshi,

Yes, I tried it and didn't work

 

Harsh Vardhan
Giga Patron

quick question here,

while using the put method , did you set the exact record id or number which you need to update on target application. this way put method will identify which record that need to update. 

for testing purpose you can set the record id or number in the end point url . 

 

 

Hi Harshvardhan

 Yes, I passed directly the record and the values