IMServer APIs
đ REST APIâ
IMServer provides REST APIs, allowing you to operate the IM system directly from the server with super permissions to enhance business functions. For example:
- đ Create Groups
- đŦ Push Messages
Usage scenarios: for example, the system automatically sends a welcome message to newly registered users.
Protocol Descriptionâ
- Protocol: Uses standard HTTP protocol
- Data Format: Requests and responses are in JSON format
Important Notesâ
API Address:
{API_ADDRESS}in the request URL is the API address for IMServer external services, for examplehttp://{your_server_ip}:10002.
Permission Requirements:
Calling REST APIs requires the identity of an APP Administrator, this user has super permissions. IMServer has a built-in APP Administrator, whose
userIDisimAdmin.
Parameter Limits:
The maximum length limit for all
arraytype parameters in API requests is1000.
API Calling Processâ
-
Get APP Administrator Token:
Get the administrator token through the
user_token API. -
Call other APIs:
Add the obtained APP administrator token to the HTTP request Header, and then call other REST APIs.
Usage Guideâ
For security reasons, REST APIs can only be used on the server side, clients use the corresponding client SDK for operations.