Skip to Content
avatar image
Former Member

Unable to consume REST service - invalid credentials

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 02 at 07:01 PM

    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

    Add comment
    10|10000 characters needed characters exceeded