播放盒-EN
  1. User-related
播放盒-EN
  • API access guide
  • Common Error Codes
  • FAQ
  • User-related
    • Log in to devices
      POST
    • Log out of the device
      DELETE
    • Change user information
      PUT
  • System control-related
    • Screenshot
      GET
    • Restart the device immediately
      POST
    • Obtain device restart schedules
      GET
    • Schedule device restarts
      POST
    • Set time
      POST
    • Install apps
      PUT
    • Obtain time
      GET
    • Factory reset
      PUT
    • Obtain terminal information
      GET
    • Obtain volume
      GET
    • Set volume
      POST
    • Upgrade the device
      PUT
    • Check local upgrade status
      GET
  • Screen control-related
    • Receiving card-related
      • Obtain receiving card connection information
      • Obtain receiving card monitoring information
      • Obtain basic information of the receiving card
      • Configure the screen via receiving card configuration (send .rcfgx file)
      • Configure the screen via receiving card configuration (send .scr file)
      • Upgrade the receiving card
      • Obtain the receiving card upgrade progress
    • Send Card-related
      • Obtain the basic Information of the sending card
    • Obtain screen brightness
      GET
    • Set screen brightness
      POST
    • Obtain screen status
      GET
    • Set screen status
      POST
    • Obtain screen-on/off schedules
      GET
    • Set screen-on/off schedules
      POST
    • Set brightness adjustment schedules
      POST
    • Obtain brightness adjustment schedules
      GET
  • General capabilities
    • Upload files
    • Download files
  • Serial port control
    • Activate RS-485 serial communication
    • Check RS-485 serial port status
  • Board relays
    • Obtain relay information
    • Set relay information
  1. User-related

Log in to devices

POST
/terminal/core/v1/user/login
Last modified:2024-08-23 09:37:05
Log in to devices
1、Pre-operations
(1)Search for devices
Search the device through the search interface and obtain basic information about the device: IP address, SN (product serial number), product name, etc.
2、Post-operations
In each subsequent request, it is necessary to include the Token sent during login in the request header. The name of the request header is "Authorization", and the value is the Token sent during login.
3、Prevent brute force login
After three consecutive failed attempts, users must wait 60 seconds before trying again.
4、Flowchart
企业微信截图_17243986108087.png

Request

Header Params
Content-Type
string 
optional
Example:
application/json
Body Params application/x-msgpack
sn
string 
SN
required
SN
username
string 
username
required
username
password
string 
password
required
password
loginType
integer 
type
required
Fixed value: 2
clientId
integer 
Unique identifier on the link end
required
Same clientId will share a token, while the tokens of different clientIds will vary. For example: 1 Note: If two clients have the same clientId, it may result in the forced logout of one client upon the login of the other.
clientName
string 
Link end name
required
Link end description, for example, ViPlex Express
Example
{
  "sn": "10016102136445658ABC",
  "username": "admin",
  "password": "88888888",
  "loginType": 2,
  "clientId": 1,
  "clientName": "Express-PC"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://192.168.0.10:16674/terminal/core/v1/user/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "sn": "10016102136445658ABC",
    "username": "admin",
    "password": "88888888",
    "loginType":2,
    "clientId":1,
    "clientName":"Express-PC"
}'

Responses

🟢200Success
application/json
Body
code
integer 
Status code
required
Status Codes OK = 0; Success ERROR = 1; Failure ERR_INVALID_PARAM = 3; Parameter error ERR_FORBIDDEN = 17; Too many login attempts ERR_NOT_EXISTED = 19; Login configuration not found on server ERR_VERIFY_FAILED = 24; Incorrect username or password
message
string 
Detailed information
required
data
object 
Data structure
required
logined
boolean 
Whether login is successful
required
False is returned when login fails.
sn
string 
sn
required
token
string 
token
optional
username
string 
username
required
password
string 
password
required
validation
boolean 
check result
required
Example
{
  "code": 0,
  "message": "",
  "data": {
    "logined": true,
    "password": "tester",
    "sn": "10016102136445658ABC",
    "token": "1722678297190UWSo6okfy123",
    "username": "admin",
    "validation": true
  }
}
🟢200Error
Previous
FAQ
Next
Log out of the device
Built with