Skip to Content
0

Unable to consume REST service - invalid credentials

Mar 01 at 01:35 PM

42

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Domi Bigl Mar 02 at 07:01 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded