Перейти к содержимому

Authenticate a customer

Это содержимое пока не доступно на вашем языке.

authCustomer checks a web login and password the way the panel login page does, without opening a session. Use it for your own portal or sign-in page: on success you get the IDs of the customer and of its web user. The web user must belong to a direct sub-customer of the authenticated customer; the root customer can check any web user.

Name Type Required Description
username string yes Web Login of the customer or of one of its web users
password string yes The web password
Name Type Description
result string OK
i_customer int ID of the customer the web user belongs to
i_web_user int ID of the web user
i_access_level string Access level of the web user, for example ADMINISTRATOR for the customer’s default user
request
call("authCustomer", {"username": "acme-web", "password": "Lp7-vQ2-xR9"})
response
{
"result": "OK",
"i_customer": 3,
"i_web_user": 17,
"i_access_level": "ADMINISTRATOR",
}
faultCode faultString Cause
400 No username specified username is missing. No password specified when password is missing
401 Unauthorized Wrong login or password, or the web user does not belong to one of your customers
410 Authenticated using One Time Password The password is a valid one-time password