Skip to content

User related messages


Get my information

Field name Type Required Description
type string Y Value must be Me

Example request:

{
    "type": "Me"
}

Get user's information

Field name Type Required Description
type string Y Value must be GetUser
user_id string Y User's unique id

Example request:

{
    "type": "GetUser",
    "user_id": "258cd77c-1618-4c44-baff-6ec73c57fa85"
}

Information update

Update user information. Current implementation only allow to update own informations. Later on the system will have a support to update another user's informations. That is partially implemented but requires more changes and controls.

Field name Type Nullable Description
type string N Value must be UpdateUser
name string Y
email string Y
password string Y
device_id string Y
custom_id string Y
user_type UserType Y
metas [Meta] Y Array of Meta information. This is user based information and have access level to whom see that information.
meta_action MetaAction Y Default value is 0

Example request:

{
    "type": "UpdateUser",
    "name": "erhan",
    "email": "erhanbaris@gmail.com",
    "password": "12345",
    "device_id": "abc123",
    "custom_id": "1234567890",
    "user_type": 3,
    "meta": {
        "lat": 123.0,
        "lon": 321.0
    }
}
{
    "type": "UpdateUser",
    "password": "12345"
}
{
    "type": "UpdateUser",
    "user_type": 3,
}
{
    "type": "UpdateUser",
    "user_type": 3,
}

User information response

Field name Type Nullable Description
status boolean N Value should be true
type string N Value should be UserInfo
id string N User's unique id
name string Y User's name
email string Y Email
device_id string Y Device id
custom_id string Y Custom id
meta UserMeta Y Meta object
user_type UserType N User's type information
online boolean N
insert_date number N
last_login_date number N

Example response:

{
    "status": true,
    "type": "UserInfo",
    "id": "b08d7b79-1405-41dc-82a1-6a882579c72a",
    "name": null,
    "email": "erhanbaris@gmail.com",
    "device_id": null,
    "custom_id": null,
    "meta": null,
    "user_type": 1,
    "online": true,
    "insert_date": 1670062718,
    "last_login_date": 1672694548
}

Field name Type Nullable Description
status boolean N Value should be false
error string N Error message

Example response:

{
    "status": false,
    "error": "Email and/or password not valid"
}