IBM Support

Rest API authentication fails with "Error 401: Unauthorized. You must be logged in or provide credentials" when using a token instead of a password

Troubleshooting


Problem

When using the Rest API to authenticate with DevOps (UrbanCode) Deploy using a token, it throws an "Error 401: Unauthorized. You must be logged in or provide credentials" error.
For Example:
When trying to get information about an application, you authenticate with a token.  This token was created for a user, "API_User".  You run the curl command using this user id and the token for the password:
curl -k -u API_User:986a011f-0df8-48d1-a63d-4fda94c4a811 -weburl https://localhost:8443/cli/application/info?application=demo-application
You get the error:

Error 401: Unauthorized. You must be logged in or provide credentials.

Symptom

The Rest API call fails with "Error 401: Unauthorized. You must be logged in or provide credentials"

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS4GSP","label":"IBM UrbanCode Deploy"},"ARM Category":[{"code":"a8m50000000CejdAAC","label":"UrbanCode Deploy-\u003EUCDP-\u003EIntegration-\u003EREST API"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"},{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSNZ6H","label":"IBM DevOps Deploy"},"ARM Category":[{"code":"a8m50000000CejdAAC","label":"UrbanCode Deploy-\u003EUCDP-\u003EIntegration-\u003EREST API"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
28 June 2024

UID

ibm17158033