Notifications

74 views

Description

Exporting PDF via RESTMessageV2 API with a basic authentication fails with HTTP 401 error.

Below are steps to be followed:

  1. Go to rest message and select the associated REST message.
  2. Set the authentication type "Basic" and set the Basic Auth Profile with the name in "sys_auth_profile_basic" table.
  3. Click on "TEST" under the related list in the HTTP method such as POST under related link, click "Test".
  4. Test run fails with below error:

 

Method failed: (/xxxxxx.do) with code: 401 - Invalid username/password combo
 

Release or Environment

All releases.

Cause

This HTTP status 401 may have been caused by below reasons:

  • The Basic Auth record in "sys_auth_profile_basic" may not have the right username and password credentials 
  • The username may not be existing in the "sys_user" table
 

Resolution

To overcome this error ; the  value in the username field in the "sys_auth_profile_basic" which is associated with the REST message Basic Auth Profile should also be checked if the username is existing on the sys_user table. 

If not , please add the username to sys_user table with providing "web_service_admin" role to that username.  Below is the documentation to follow :

Configure a REST message with basic auth

Create a basic auth profile

 

Article Information

Last Updated:2020-03-18 07:26:27
Published:2020-03-18