Skip to Content
avatar image
Former Member

Unable to pass credentials while consuming a REST-service

Hi,

I'm consuming a REST-service from an ABAP-program.

Managed to connect to the service, providing my User-ID & Password via the pop-up.

Now I want to connect to the service directly, without entering my credentials.

So, I suppress the pop-up using:

  • lo_http_client->propertytype_logon_popup = lo_http_client->co_disabled

And provide my credentials via:

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

But the response I get contains:

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

Is this the correct way to implement the call?

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 01 at 01:23 PM

    Solved it, by using cl_http_client=>create_by_destination instead of cl_http_client=>create_by_url.

    And creating the destination via SM59 offcourse.

    Add comment
    10|10000 characters needed characters exceeded