A
A
Alexander Ivanov2021-07-22 14:41:40
PHP
Alexander Ivanov, 2021-07-22 14:41:40

How to log in to SBIS EDO via API?

Hello!

Who worked with the VLIS EDO API - tell me how to log in using a login / password,

I send POST according to the documentation at https://online.sbis.ru/auth/service/

{
    "jsonrpc": "2.0",
    "method": "СБИС.Аутентифицировать",
    "params": {
        "Параметр": {
            "Логин": "LOGIN",
            "Пароль": "PASSWORD",
            "НомерАккаунта": "ACCOUNT"
        }
    },
    "id": 0
}



But the answer comes only

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32700,
        "message": "",
        "details": "Error while decoding the request",
        "type": "error",
        "data": {
            "classid": "{f4101a18-9ea7-447d-9f98-9a951643f9f0}",
            "error_code": -1,
            "addinfo": null
        }
    },
    "id": null
}


I checked everything several times and I do not understand what could be the problem

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
aagzip, 2021-07-22
@aagzip

Your address is wrong.
Get an access token
To get an access token, send a POST request to the VLSI server. In the request, pass the application ID, as well as the protected and service keys. They can be viewed in the application settings.
Address to fulfill the request: https://online.sbis.ru/oauth/service/

D
Denis, 2021-11-20
@nabarabane

Faced the same error.
You need to add the header "Content-Type: application/json; charset=utf-8" to the request
And everything will work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question