ym88659208ym87991671
Request user information (get user) | Documentation for developers

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:

  1. In Salute mobile app, a user links their Sber ID and their vendor account.
  2. Sber Smart Home sends a query together with the user token, for the user ID in the vendor's system.
  3. 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:

FieldTypeMandatory?Description
idstring✔︎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": []
}
Sber process cookies only to personalize services according to Cookies Usage Policy. You can prevent the processing of cookies in your browser settings.