Profiles Management

Introduction

This module allows you to work with Users profiles. Manage users lists, get customized (advanced) profile fields and ban states. You can learn how to work with users in the Dashboard here.

Profile Management Methods

Users.GetUsersList (get_users_list)

This method requires Project ID and Client Key

API Url:

https://cp.ocugine.pro/api/users/get_users_list/

Request POST Params:

Parameter Type Description
app_id (required) double Project ID
app_key (required) string Project Client Key
page page Requested page for the list

Response Example:

{
    "complete": true,
    "message": null,
    "data": {
        "list": [
            {
                "uid": "432",
                "first_name": "Ocugine",
                "last_name": "Platform",
                "avatar": "https://cp.ocugine.pro/storage/7111462/6325127.jpg",
                "email": "[email protected]",
                "profile_data": [],
                "profile_type": "1",
                "profile_uid": "17",
                "project_id": "59",
                "group_id": -1,
                "ban_state": {
                    "uid": "2",
                    "profile_uid": "17",
                    "project_id": "59",
                    "ban_state": false,
                    "ban_escape": "0",
                    "ban_reason": ""
                }
            }
        ]
    }
}

Users.FindUser (find_user)

This method requires Project ID and Client Key

API Url:

https://cp.ocugine.pro/api/users/find_user/

Request POST Params:

Parameter Type Description
app_id (required) double Project ID
app_key (required) string Project Client Key
search string Search request
page page Requested page for the list

Response Example:

{
    "complete": true,
    "message": null,
    "data": {
        "list": [
            {
                "uid": "432",
                "first_name": "Ocugine",
                "last_name": "Platform",
                "avatar": "https://cp.ocugine.pro/storage/7111462/6325127.jpg",
                "email": "[email protected]",
                "profile_data": [],
                "profile_type": "1",
                "profile_uid": "17",
                "project_id": "59",
                "group_id": -1,
                "ban_state": {
                    "uid": "2",
                    "profile_uid": "17",
                    "project_id": "59",
                    "ban_state": false,
                    "ban_escape": "0",
                    "ban_reason": ""
                }
            }
        ]
    }
}

Users.GetUserData (get_user_data)

This method requires Authentication (Access Token), Project ID and Client Key

API Url:

https://cp.ocugine.pro/api/users/get_user_data/

Request POST Params:

Parameter Type Description
app_id (required) double Project ID
app_key (required) string Project Client Key
access_token (required) string User Access Token

Response Example:

{
    "complete": true,
    "message": null,
    "data": {
        "group_id": -1,
        "base_data": {
            "uid": "17",
            "first_name": "Ocugine",
            "last_name": "Platform",
            "avatar": "https://cp.ocugine.pro/storage/7111462/6325127.jpg",
            "email": "[email protected]",
            "profile_data": false,
            "profile_type": false
        },
        "advanced_fields": [
            {
                "uid": "5",
                "name": "Coins",
                "sorting": "3",
                "hidden": "1",
                "type": "1",
                "project_id": "59",
                "required": "1",
                "default_value": "0",
                "value": "5"
            },
            {
                "uid": "4",
                "name": "Phone Number",
                "sorting": "7",
                "hidden": "0",
                "type": "5",
                "project_id": "59",
                "required": "0",
                "default_value": "",
                "value": ""
            },
            {
                "uid": "6",
                "name": "Diamonds",
                "sorting": "8",
                "hidden": "1",
                "type": "1",
                "project_id": "59",
                "required": "0",
                "default_value": "0",
                "value": ""
            },
            {
                "uid": "452",
                "name": "Image",
                "sorting": "9",
                "hidden": "0",
                "type": "7",
                "project_id": "59",
                "required": "0",
                "default_value": "",
                "value": ""
            },
            {
                "uid": "453",
                "name": "Selectable Field",
                "sorting": "10",
                "hidden": "0",
                "type": "2",
                "project_id": "59",
                "required": "0",
                "default_value": "one\r\ntwo\r\nfree",
                "value": "0"
            },
            {
                "uid": "454",
                "name": "Multiselect Field",
                "sorting": "11",
                "hidden": "0",
                "type": "3",
                "project_id": "59",
                "required": "0",
                "default_value": "one\r\ntwo\r\nfree\r\nfour",
                "value": [
                    "1"
                ]
            }
        ],
        "ban_data": {
            "uid": "2",
            "profile_uid": "17",
            "project_id": "59",
            "ban_state": false,
            "ban_escape": "0",
            "ban_reason": ""
        }
    }
}

Users.GetUserByUID (get_user_by_id)

This method requires Project ID and Client Key

API Url:

https://cp.ocugine.pro/api/users/get_user_by_id/

Request POST Params:

Parameter Type Description
app_id (required) double Project ID
app_key (required) string Project Client Key
profile_uid (required) double User Profile UID

Response Example:

{
    "complete": true,
    "message": null,
    "data": {
        "group_id": -1,
        "base_data": {
            "uid": "17",
            "first_name": "Ocugine",
            "last_name": "Platform",
            "avatar": "https://cp.ocugine.pro/storage/7111462/6325127.jpg",
            "email": "[email protected]",
            "profile_data": false,
            "profile_type": false
        },
        "advanced_fields": [
            {
                "uid": "5",
                "name": "Coins",
                "sorting": "3",
                "hidden": "1",
                "type": "1",
                "project_id": "59",
                "required": "1",
                "default_value": "0",
                "value": "5"
            },
            {
                "uid": "4",
                "name": "Phone Number",
                "sorting": "7",
                "hidden": "0",
                "type": "5",
                "project_id": "59",
                "required": "0",
                "default_value": "",
                "value": ""
            },
            {
                "uid": "6",
                "name": "Diamonds",
                "sorting": "8",
                "hidden": "1",
                "type": "1",
                "project_id": "59",
                "required": "0",
                "default_value": "0",
                "value": ""
            },
            {
                "uid": "452",
                "name": "Image",
                "sorting": "9",
                "hidden": "0",
                "type": "7",
                "project_id": "59",
                "required": "0",
                "default_value": "",
                "value": ""
            },
            {
                "uid": "453",
                "name": "Selectable Field",
                "sorting": "10",
                "hidden": "0",
                "type": "2",
                "project_id": "59",
                "required": "0",
                "default_value": "one\r\ntwo\r\nfree",
                "value": "0"
            },
            {
                "uid": "454",
                "name": "Multiselect Field",
                "sorting": "11",
                "hidden": "0",
                "type": "3",
                "project_id": "59",
                "required": "0",
                "default_value": "one\r\ntwo\r\nfree\r\nfour",
                "value": [
                    "1"
                ]
            }
        ],
        "ban_data": {
            "uid": "2",
            "profile_uid": "17",
            "project_id": "59",
            "ban_state": false,
            "ban_escape": "0",
            "ban_reason": ""
        }
    }
}

Users.GetBanState (get_ban_state)

This method requires Project ID and Client Key

API Url:

https://cp.ocugine.pro/api/users/get_ban_state/

Request POST Params:

Parameter Type Description
app_id (required) double Project ID
app_key (required) string Project Client Key
profile_uid (required) double User Profile UID

Response Example:

{
    "complete": true,
    "message": null,
    "data": {
        "ban": false,
        "escape": 0,
        "reason": "",
        "escape_days": 0
    }
}

Users.GetAdvancedProfileFields (get_fields)

This method requires Project ID and Client Key

API Url:

https://cp.ocugine.pro/api/users/get_fields/

Request POST Params:

Parameter Type Description
app_id (required) double Project ID
app_key (required) string Project Client Key
search string Search Request
page double The page number for the list

Response Example:

{
    "complete": true,
    "message": "",
    "data": {
        "list": [
            {
                "uid": "5",
                "name": "Coins",
                "sorting": "3",
                "hidden": "1",
                "type": "1",
                "project_id": "59",
                "required": "1",
                "default_value": "0"
            },
            {
                "uid": "4",
                "name": "Phone Number",
                "sorting": "7",
                "hidden": "0",
                "type": "5",
                "project_id": "59",
                "required": "0",
                "default_value": ""
            },
            {
                "uid": "6",
                "name": "Diamonds",
                "sorting": "8",
                "hidden": "1",
                "type": "1",
                "project_id": "59",
                "required": "0",
                "default_value": "0"
            },
            {
                "uid": "452",
                "name": "Image",
                "sorting": "9",
                "hidden": "0",
                "type": "7",
                "project_id": "59",
                "required": "0",
                "default_value": ""
            },
            {
                "uid": "453",
                "name": "Selectable Field",
                "sorting": "10",
                "hidden": "0",
                "type": "2",
                "project_id": "59",
                "required": "0",
                "default_value": "one\r\ntwo\r\nfree"
            },
            {
                "uid": "454",
                "name": "Multiselect Field",
                "sorting": "11",
                "hidden": "0",
                "type": "3",
                "project_id": "59",
                "required": "0",
                "default_value": "one\r\ntwo\r\nfree\r\nfour"
            }
        ]
    }
}

Users.SetAdvancedFieldData (set_field)

This method requires Project ID and Client Key

API Url:

https://cp.ocugine.pro/api/users/set_field/

Request POST Params:

Parameter Type Description
app_id (required) double Project ID
app_key (required) string Project Client Key
profile_uid (required) double User Profile UID
field_id (required) double Advanced Field UID
value mixed The value to update this advanced field for this user

Response Example:

{
    "complete": true,
    "message": "",
    "data": []
}