Skip to Content
Author's profile photo Nageshwar Reddy

Java based HTTP adapter – How to pass username and password in query string?

If you have started using Java based HTTP sender adapter, either you might have spent some time in finding out how to pass user name and password in the query string or you might still be wondering how to pass user name and password in query string.

If you use sap-user and sap-password, you might have noticed that it is not working anymore and you would get authentication error “HTTP/1.1 401 Unauthorized”.

Instead of sap-user, j_username can be used to pass username in query string.

Instead of sap-password, j_password can be used to pass password in query string.

The url should look like


Additional details on Java based HTTP adapter test tool are available at PI 7.30 HTTP Java Adapter Test Tools.

Additiona details on configuring the Java HTTP sender adapter and URL details are available at AAE – Configuring the Java HTTP Adapter on the Sender Channel.

Caution: You should avoid using this method of authentication in your landscape. This short blog is written just to inform the readers on what parameter names to be used for  user name and password in query string of http client that is sending request to Java HTTP adapter.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Jochen Hätty
      Jochen Hätty

      Very helpful, thank you very much!

      Author's profile photo K Umasankar
      K Umasankar


      I was searching online regarding how to pass username and password in to authenticate with sender http adapter. Thanks, now i was able to connect.

      As you said,

      You should avoid using this method of authentication in your landscape

      What authentication would you prefer ?


      Author's profile photo Kalpana Timmapuram
      Kalpana Timmapuram

      Hi K Umasankar ,

      you just replied that you could get the HTTP connection working by adding the credentials in the URL , can you please let me know what exactly you had done to get this working? do you need to enable any parameter etc.,  We had been trying to perform this in my interface since a while, I am unable to get it by using the exact same query string proposed in this blog. Is there any UME parameter that should be set to get this setup?