×

User information

This API retrieves detailed information about a user by their user_id.

How to get data

Request address

To get the data, use the address:  https://<server_address>/api/api.php?

Request method

GET or POST

Request parameters

  • cmd=get_user — API command to get user information
  • user_id — identifier of the user whose information should be retrieved
  • node — node number where the command should be executed
 

Example GET request

https://<server_address>/api/api.php?cmd=get_user&user_id=19&node=1

Example POST request

Request body (JSON):
{
    "cmd": "get_user",
    "user_id": 19
}
Response
{
    "code": 0,
    "msg": "Success",
    "data": {
        "id": 19,
        "roleid": 1,
        "info": "",
        "msisdn": "123123",
        "email": "testTOTP@testTOTP.com",
        "name": "dasd",
        "account_id": 1000,
        "lang": "en",
        "parent_id": 2
    }
}
In response to the API request, the following is returned:
  • code — result code (0 = successful operation)
  • msg — server message
  • data — user information object:
  • id — user ID
  • roleid — user role (0 = Admin, 1 = User)
  • info — additional user information
  • msisdn — phone number
  • email— user’s email address
  • name — user’s name
  • account_id — account ID the user belongs to
  • lang — user interface language
  • parent_id— parent user ID (if any)