cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to consume REST service - invalid credentials

Former Member
0 Kudos

Hi,

I'm calling an external webservice from an ABAP, which works ok as long as I supply my UserID & password via the pop-up.

When I suppress the dialog, using:

  • lo_http_client->propertytype_logon_popup = lo_http_client->co_disabled

And supply my credentials via:

  • lo_http_client->authenticate( username = lv_user password = lv_password )

I receive the error:

  • 401 - Unauthorized: Access is denied due to invalid credentials

Is this the correct way to connect without explicit logon?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Domi
Contributor
0 Kudos

Hi Axel

Yes, this is the right way.

You even don't need to suppress the popup with

lo_http_client->propertytype_logon_popup = lo_http_client->co_disabled

Just set the user/password before calling

lo_http_client->authenticate( username = lv_user password = lv_password )
...
lo_http_client->send( )

Then popup will only come up if the credentials are invalid and GUI is available.

regards

Domi

Answers (0)