Request user information (get user)
Last updated on September 28, 2022
Sber Smart Home queries the vendor for a user ID in the vendor's system. It is used in the following case:
- In Salute mobile app, a user links their Sber ID and their vendor account.
- Sber Smart Home sends a query together with the user token, for the user ID in the vendor's system.
- The vendor returns the user ID.
Query format
Sber Smart Home sends a query to the vendor's endpoint. For the headers, see Query headers.
GET /v1/user
Response format
Success response:
Field | Type | Mandatory? | Description |
id | string | ✔︎ | User ID in the vendor’s system |
{
"id": string
}
When an error occurs, an object of the Common error (common error) type should be returned:
{
"code": integer,
"message": string,
"details": list<string>
}
Sample query and response
Sber Smart Home queries the vendor for a user ID in the vendor's system.
Query:
curl -i -X GET /v1/user HTTP/1.1 \
-H Host: example.com \
-H Content-Type: application/json \
-H Authorization: Bearer qwerty-1234-... \
-H X-Request-Id: abcd-0000-ifgh-...
Success response:
{
"id": "AB12345"
}
Error response:
{
"code": 400,
"message": "Invalid argument",
"details": []
}