-
Notifications
You must be signed in to change notification settings - Fork 9
Authentication
Zijun Chen edited this page Sep 18, 2018
·
2 revisions
Required Parameters
Parameter | Optional | Type | Description |
---|---|---|---|
token | - | String | user token from log_in |
Example of calling v1/user/info
v1/user/info?token=eyJhbGciOiJ......6rY7GEfg-c
Possible Error Codes
Error Code | Description |
---|---|
-1 | Authorisation error |
Failure Example
{
"code": -1,
"msg": "Authorization error",
"detail": "Failed to parse the token"
}
Required Parameters
Parameter | Optional | Type | Description |
---|---|---|---|
sid | - | String | a unique id of the slave |
key | - | String | slave key |
Example of calling v1/slave/init
v1/slave/init?sid=slave001&key=secretslavekey
Possible Error Codes
Error Code | Description |
---|---|
-1 | Authorisation error |
Failure Example
{
"code": -1,
"msg": "Authorization error",
}