Skip to content

Сreating and configuring an instance using the partner key#

  1. To create an instance using the partner's method createInstance, when creating the instance, you need to pass instance settings.

  2. After creating the instance, it is required to continuously request the status of the created instance every 5 seconds using the method getStateInstance, doing before receiving the status "Not authorized".

    The response body null when calling the getStateInstance method means the instance is still being created. You can use this token until the instance readiness status notAuthorized is received.

  3. After receiving the notAuthorized status, you must request the QR code by calling the QR method every two seconds (so that the client always has an up-to-date QR code).

  4. After successfully pairing with the device, receiving requests for the QR code must be stopped. The instance settings do not change over time, and there is no need to renew the instance settings. You can check the installation of the settings using the method GetSettings.

General recommendations for creating and configuring an instance.

Optional recommendations (Non requiring):

  1. For clients, it is recommended to connect the device in an alternative way - by requesting an authorization code using the getAuthorizationCode method.
  2. To get the current QR code, it is recommended to request it via a websocket connection using the scanqrcode method.