REST Message - 401 - Invalid username/password combo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2019 08:23 AM
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:
Thank you
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2019 08:57 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2019 02:20 PM
Hi sachin.namjoshi,
Yes, I tried it and didn't work

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2019 09:01 AM
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 .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2019 02:16 PM
Yes, I passed directly the record and the values