New HTML5 features REST API available (updated Nov 2020)
These features are only for SUBSCRIBED ussers.
-> Log in into your chatadmin / developers panel to get your REST API URL.
We are adding new REST interfaces that allow users to get some informations about their chat.
The pattern is:
https://YOUR_REST_API_LINK:2083/{action}/{webmasterid}/{token}
For now we added these REST APIs:
getNumberUsers: allows to get the number of users in all rooms in chat!
This example is for : webmasterid = 1 token = 999
https://YOUR_REST_API_LINK:2083/getNumberUsers/1/999
getUsers : get all users in all rooms in chat
This example is for : webmasterid = 1 token = 999
https://YOUR_REST_API_LINK:2083/getUsers/1/999
getPerformers : get all performers in a namespace webmasterid (performers = users whose role = ‘performer’)
This example is for : webmasterid = 1 token = 999
https://YOUR_REST_API_LINK:2083/getPerformers/1/999
getOnlinePerformers : get all online performers in a namespace webmasterid (performers = users whose role = ‘performer’)
This example is for : webmasterid = 1 token = 999
https://YOUR_REST_API_LINK:2083/getOnlinePerformers /1/999
getUserStatus: get the status of userid in a namespace webmasterid (returns: “online” or “offline” or “busy”)
This example is for : webmasterid = 1 userid= 300
https://YOUR_REST_API_LINK:2083/getUserStatus/1/300
getUsersInRoom: get all users in a room roomid of namespace webmasterid
This example is for : webmasterid = 1 roomid = 50
https://YOUR_REST_API_LINK:2083/getUsersInRoom/1/50/token
getNumberUsersInRoom: return the number of users of a room roomid in namespace webmasterid
This example is for : webmasterid = 1 roomid = 50, token=999
https://YOUR_REST_API_LINK:2083/getNumberUsersInRoom/1/50/999
How to use that in php for instance: (we suppose your YOUR_REST_API_LINK is https://chat.html5-chat.com which can be DIFFERENT on your website: connect to chatadmin -> developers to get yours)
$numberOfUsers = file_get_contents("https://chat.html5-chat.com:2083/getNumberUsers/1/50/999");
getRooms: return your chat rooms.
This example is for : webmasterid = 1, token=999
https://YOUR_REST_API_LINK:2083/getRooms/1/999
How to use that in php for instance: (we suppose your YOUR_REST_API_LINK is https://chat.html5-chat.com which can be DIFFERENT on your website: connect to chatadmin -> developers to get yours)
$rooms = json_decode(file_get_contents("https://chat.html5-chat.com:2083/getRooms/1/999"));
print_r($rooms)
You made a type error…
It should be:
$numberOfUsers = file_get_contents(“https://chat.html5-chat.com:8008/getNumberUsers/1/999”);
( contents and not contens )
regards
Paul
Hi
Could anyone explain for me how to get only the “name” extracted from , getUsers request ?, would be great with examples for the different “Requests” , in PHP and/or Javascript
Regards Jorgen
Hello,
I can not find the YOUR_REST_API_LINK, Where can I find this?
Or do I have to pay?
Thanx in advance.
Hello,
When I click on “subscribed members” I see an error-page. I want this 😀
Kann Mann das html5-chat im Chat als url erstellen mit einen anderen url Chatnameboder ist das mein feste url Seite für alle Benutzer für den Chat.