Step 1. Account Linking

Account linking is the pairing of a user's Sber ID account with his/her account in the vendor's system. As a result, Sber Smart Home gets an access token to send commands to the Tuya Cloud. Authorization and tokenization are done using the standard OAuth 2.0 protocol.

No development is required from the vendor to link accounts: you only need to specify the authorization page address and the data necessary to access the webhook in SmartMarket Studio.

The procedure for account linking is as follows:

  1. In Salute mobile app, a user opens the Device Management section and selects a vendor.
  2. The application displays the vendor authorization form; its address is specified in SmartMarket Studio.
  3. The user enters a login and password. The Tuya authorization server checks their validity. If everything is correct, the server returns the code to get the token.
  4. Sber Smart Home uses the received code, together with the vendor's Client ID and Secret ID, to send queries for the user’s access token and refresh token, and stores such tokens. The vendor specifies Client ID and Secret ID in SmartMarket Studio.