OpenIM Server APIs
đ REST APIâ
OpenIM Server provides a REST API, allowing you to make requests to the IM system with superuser privileges, enhancing business functionality. For example:
- đ Create a Group
- đŦ Send Messages
Use case: Automatically sending a welcome message to newly registered users.
Protocol Detailsâ
- Protocol: Uses the standard HTTP protocol
- Data Format: Both requests and responses are in JSON format
Important Notesâ
API URL:
The
{API_ADDRESS}
in the request URL is the API address of your OpenIM Server, e.g.,http://{your_im_server_ip}:10002
.
Permission Requirements:
To call the REST API, you must use an APP Administrator account, which has superuser privileges. OpenIM Server has a built-in APP Administrator with the
userID
ofimAdmin
.
Parameter Limits:
All
array
type parameters in API requests have a maximum length limit of1000
.
API Call Processâ
Obtain APP Administrator Token:
Use the
user_token API
to obtain the administrator token.Call Other APIs:
Add the obtained APP administrator token to the HTTP request header, and then call other REST APIs.