1. Overview
  2. Get code
  3. Process of pairing code

1 Overview

The process of getting Code

  • Application gets code
  • Application displays QRcode generated from code

The process of scanning Code

  • Clients use app to scan QRcode to get code (or clients input code by keyboard)
  • Clients’ app use the code to bind to the specific space
  • Space server will notify clients’ app and device through socketio to display new member

2 Get code

To get the code, client application must make a call to POST /api/apps/{app_id}/pairingcodes , where app_id is the application id, to get the code. This code is a string consists of 8 characters. Then, application could use this code to generate QRcode. Client application could use anonymous user or user or oauth2 token to make this call

3 Process of pairing code

When client application scanned the QRcode and get the code, the application could make a call to POST /api/apps/pair , with code and specific topic ID. Then, servier will pair the user who use this application to that specific topic. If the pairing succeed, application will get response which contains the topic ID, code and scan user's information. Client application could use anonymous user or user or oauth2 token to make this call.

Also, if the pairing succeed, client application will receive a socket notification of APP_PAIRING_AUTHORIZED . Client could get the topic ID, code and scan user's information from socket notification , which is same as the above response, for confirmation.