cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sap business one Service Layer: Remote Server ask for credentials

former_member415804
Discoverer
0 Likes
3,201

Hello,

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Likes

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 (https://blogs.sap.com/2017/10/19/sap-business-one-on-hana-development-e-learning-is-live/) 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,
Trinidad.