Skip to Content
avatar image
Former Member

sap business one Service Layer: Remote Server ask for credentials


I am trying to execute Service Layer Login through the google chrome navigator. But when I try to get the result with the url

https://IP:50000/b1s/v1/Login I am asked for a credential (user and password) that I am not know who is that user (linux server, SLD...)

This happens for any service not just Login.

Please, could you tell me about it?

Thank you

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    If I ignore the credentials I have this error

    { "error" : { "code" : 300, "message" : { "lang" : "en-us", "value" : "Invalid user format in the authorization header" } } }

  • Get RSS Feed

1 Answer

  • Dec 04, 2017 at 02:53 PM

    Hi M.Carmen,

    In order to be able to connect to SAP Business One Service Layer you need to first login (same behavior as SDK DI API if you already workwed with it). You cannot directly call Service Layer from a web browser like Google Chrome. A Browser will send ah http GET request and the Login command requires an http POST command with a body containing the credentials for login.

    You need to use a tool like Postman or Advanced Rest Client to first call a Login request (providing the B1 Login credentials in the request body: b1user, b1password and companyDB) that will open a session for your user and get a ConnectionString. All subsequent requests to Servcie Layer for the same user session will have to use the ConnectionString as a cookie in the request (this cookie is automatically managed by tools like Postman or Advanced Rest Client).

    If you follow the different eLearning sessions in the B1 Extensibility eLearning ( dedicated to Service Layer you will understand how to call Service Layer for doing a Login and subsequent calls.

    Let me know if it helps,

    Add comment
    10|10000 characters needed characters exceeded