Notifications

Introduction

Work with Notifications via Ocugine Direct API or our SDKs. Get all available notifications by filter for authenticated / guest users, set read state, etc. Learn more about notifications in the Dashboard here.

In-Game Notifications Methods

Users.GetNotificationsList (get_notifications)

This method required Project ID and Client Key

API Url:

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

Request POST Params:

Parameter Type Description
app_id (required) double Project ID
app_key (required) string Project Client Key
platform int Platform Identifier.
access_token string User access token with "messages" grant or empty field for guests

Available Platform flags

Flag Platform
-1 All Platforms
1 Android
2 iOS
3 Windows (Standalone)
4 Windows (UWP)
5 Xbox One
6 Playstation 4
7 Nintendo Switch
8 Web
9 Mac / Linux

Response Example:

{
    "complete": true,
    "message": "",
    "data": {
        "list": [
            {
                "uid": "10",
                "project_id": "59",
                "name": "Test",
                "content": "Test notifications",
                "for_authenticated": "0",
                "platform": "-1",
                "user_group": "-1",
                "target_type": "0",
                "target_field": "0",
                "target_condition": "0",
                "target_value": "",
                "time": "1569412518",
                "end_time": "1569585318",
                "priority": "2"
            }
        ]
    }
}

Users.GetNotificationData (get_notification_data)

This method requires Project ID and Client Key

API Url:

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

Request POST Params:

Parameter Type Description
app_id (required) double Project ID
app_key (required) string Project Client Key
uid (required) double Notification UID

Response Example:

{
    "complete": true,
    "message": "",
    "data": {
        "uid": "10",
        "project_id": "59",
        "name": "Test",
        "content": "Test notifications",
        "for_authenticated": "0",
        "platform": "-1",
        "user_group": "-1",
        "target_type": "0",
        "target_field": "0",
        "target_condition": "0",
        "target_value": "",
        "time": "1569412518",
        "end_time": "1569585318",
        "priority": "2"
    }
}

Users.ReadNotification

This method requires Project ID and Client Key

API Url:

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

Request POST Params:

Parameter Type Description
app_id (required) double Project ID
app_key (required) string Project Client Key
uid (required) double Notification UID
access_token string User access token with "messages" grant or empty field for guests

Response Example:

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