Log in to the Client

Last Updated on : 2021-08-27 02:18:40download

Log in to the client with the username and password.

API address

POST: /v1.0/iot-03/users/login

Request parameter

Description of body

Parameter name Type IN Required Description
username String true The username.
password String true The password, encrypted with SHA256 and converted to lower case.

Return parameter

Parameter name Type Description
result UserLoginTokenRes The returned result.

Description of result

Parameter name Type Description
uid String The user ID.
access_token String The access token.
refresh_token String The refreshed token.
expire Integer The time when the token expires.

Request example

POST: /v1.0/iot-03/users/login
{ "username": "9167400000", "password": "77c4326bexxxxbfb480" }

Return example

{ "result": { "access_token": "28158d5axxxxca791a1f24b8", "refresh_token": "43cccaff1xxxb72a89e253", "uid": "bay1616xxxcvxu", "expire": 7200 }, "t": 1616501324298, "success": true }

Error code

For more information, see error code.