Notification API - token.info

This API action returns information about a specific user token. The "clients" response data parameter contains the number of currently connected websockets with the same user token.

API service and action

webntfWebsocket service called via API
token.infoAction called on remote API

API request data

domainTarget domain name for notifications
tokenKey of the required user token

Example request data

array(2) {
    ["domain"]=>
    string(16) "www.websocket.cz"
    ["token"]=>
    string(25) "6ju9xnrkhh7z1x3md12fkek3v"
}

Example PHP code for call websocket API

$responseData = $rest2WebSocket->call("webntf", "token.info", [
    "domain" => "www.websocket.cz"
    , "token" => "6ju9xnrkhh7z1x3md12fkek3v"
]);

API response data

array(3) {
    ["status"]=>
    string(2) "OK"
    ["time"]=>
    float(1647438707.101974)
    ["result"]=>
    array(7) {
        ["key"]=>
        string(25) "6ju9xnrkhh7z163md12fkek3v"
        ["time"]=>
        float(1647436601.208588)
        ["expire"]=>
        float(1647440201.208588)
        ["domain"]=>
        string(16) "www.websocket.cz"
        ["locked"]=>
        int(1)
        ["stored"]=>
        int(0)
        ["clients"]=>
        int(3)
    }
}