Three party user information docking

Function Description

Unified implementation of third-party user docking services, this interface can achieve a series of docking methods such as face/scan code/card reader/push/ID (string identification of phone number, email, etc.)

Request Description

Request Method:POST
Request URL:/third_user
parameter format:raw(json)

Request parameters

Field Field Type Field Description
type String User identification type
value String User identification value
scene String Scenario (This value was not included in previous versions, please note compatibility or prompt users to upgrade if used)
scene Parameter Description
Scene Identifier Description Supported Products
meas-composition Body composition XONE series, U+ series
meas-posture Postural Assessment XONE series
meas-girth Body Shape Assessment XONE series
meas-balance Balance Assessmen XONE series
meas-3t 3T Assessment XONE series
meas-composition-posture Body composition+Postural U+ series
meas-composition-postpartum Body composition+Postural+postpartum U+ series
type corresponding value transfer instructions
Type Identification Value Transfer Description Supported Products
Face recognition face_image base64 Face image XONE series
QR code qr Device generated QR code scanned XONE series, U+ series
Scan Code scan Device facial camera scans third-party QR codes/barcodes XONE series
Scan Code - Peripherals scan-ed External code scanner identification XONE series
Card Reader - Peripherals card-ed External card reader identification XONE series
ID id The id value entered by the user XONE series
Push login f-push Current device SN XONE series

Request Parameter Example:

// Face login docking
{
  "type": "face_image",
  "value": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaUAAAHXCAIAAA...", // base64编码图片
  "scene": "meas-composition"
}

// ID login docking
{
  "type": "id",
  "value": "13900000000", // 用户输入ID值
  "scene": "meas-composition"
}

// Scan Code Login Docking
{
  "type": "scan",
  "value": "张飞/男/310100000000000000000000/50000000000X", // Scan code identification value
  "scene": "meas-composition"
}

// QR code login docking, after entering the scan page, poll every 1 second
{
  "type": "qr",
  "value": "0c376c08-a879-4caa-8262-109eff12b4ae", // Unique identification of the current QR code
  "scene": "meas-composition"
}

// Push login docking, after enabling push login, poll every 1 second
{
  "type": "f-push",
  "value": "3398182015544" // Current device SN
}

// Reader recognition login docking
{
  "type": "card-ed",
  "value": {
    "card_no_dec":"3865598306",
    "card_no_hex":"E6685962",
  }
}

Return Results

Identify successful login response

Applicable login methods:ALL

{
    "code": 0,
    "message": "SUCCESS",
    "result": {
        "user_info":{
            "uid": 376507,
            "phone": "13900000000",
            "gender": 1,
            "birthday": "1997-08-01", // Test age (3-99)
            "height": 172, // Height (90-240)
            "nick_name": "水无痕",
            "avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/AgglAoVrBeluv2RzUE0NgQRXAAhMss3NTpWjPBGDTtWQBAo2xoEBEzFbV6R4LZe9lygE65rtCDCnjCzg5rctpQ/132"
        },
        "extend_data": "9d29eaf697b4d04fe305e34cd26d11e2",
        "scene":"meas-composition"  // Only push login method is valid and must be provided in push login scenarios


    }
}
Polling login methods (such as QR code login, push login, card reader), response content while waiting

Applicable login methods:qr、f-push、card-ed

{
    "code": 0,
    "message": "SUCCESS",
    "result": {
        "waiting":1
    }
}
Face recognition login did not recognize facial response content

Applicable login methods:face_image

{
    "code": 0,
    "message": "SUCCESS",
    "result": {
        "recognizing_faces":0
    }
}
Account does not exist, is invalid, or login is prohibited in response

Applicable login methods:ALL

{
    "code": 0,
    "message": "SUCCESS",
    "result": {
        "login_control":{
            "allow_login":0,
            "message":"您的账号不存在或已失效,不允许测试"
        }
    }
}

Return parameters

Field Field Type Field Description
user_info Object User information
extend_data String Optional, user extended information, up to 255 characters long, returned with the original value of the report's basic information
recognizing_faces Integer Face recognition required, whether a face is recognized (0: No, 1: Yes)
login_control Object Optional, login control (to be implemented in future versions)
waiting Integer Optional, whether waiting (0: No, 1: Yes), only polling login method is valid
scene String Optional, specify which testing scenario to enter (only push login method is valid and currently required)

user_info Parameter Description

Field Field Type Field Description
uid Integer Must,UID
phone String Must,User's mobile phone number or any numeric ID (1 to 50 digits, Chinese version must have 11 digits)
gender Integer Optional, gender (1: male, 2: female), default: male
birthday String Optional, Birthday (e.g. 2021-10-14)
height Integer Optional, height (e.g. 180)
nick_name String Optional, nickname (e.g. Zhang San)
avatar_url String Optional, avatar address

The device matches local user information using uid (first) and phone (later), and determines whether to update the information in user_info to the local based on force_update.

The uid will be returned as the key third_uid in the basic information report.

If birthday, height, and gender are missing, they can be supplemented on the device.

login_control Parameter Description

If a user is prohibited from logging in, this field must be provided, and allow_login must be set to 0.

If the user's recognizing_faces is 0, the user is required to re-perform facial recognition, and allow_login should be set to 2.

If the login_control is not provided, testing is permitted by default.

Field Field Type Description
allow_login Integer Whether testing is allowed (0: Testing Prohibited, 1: Testing Allowed, 2: Retry Allowed)
message String Interface prompt message after "Test Prohibited" / "Retry Allowed"

Other

For push login docking f-push , we suggest the following design scheme

Push is only effective when the device has enabled push login mode and is in the waiting instruction interface. Therefore, it is recommended to maintain the pushable status of each device, which can be maintained by the device's [/third_user] request.

The following plan is for reference:

1. Maintain a device push `waiting record`(Including SN, last communication time, response content);
2. `/third_user` request initiated by the device to activate/maintain, valid for 1 second;;
3. When the record is in an active state, the user can initiate a push and record the push information to the `waiting record`;
4. After responding to the device, remove the `waiting record` (which must be within the validity period).

External card reader login card-ed precautions

Product description for docking

The xone series currently does not include xone plus and previous products.

results matching ""

    No results matching ""