You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenIM Server provides a **REST API**, allowing you to make requests to the IM system with superuser privileges, enhancing business functionality. For example:
11
+
12
+
- 🛠 **Create a Group**
13
+
- 📬 **Send Messages**
14
+
15
+
Use case: Automatically sending a welcome message to newly registered users.
16
+
17
+
### Protocol Details
18
+
-**Protocol**: Uses the standard HTTP protocol
19
+
-**Data Format**: Both requests and responses are in JSON format
20
+
21
+
### Important Notes
22
+
23
+
> **API URL**:
24
+
>
25
+
> The `{API_ADDRESS}` in the request URL is the API address of your OpenIM Server, e.g., `http://{your_im_server_ip}:10002`.
26
+
27
+
> **Permission Requirements**:
28
+
>
29
+
> 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` of `imAdmin`.
30
+
31
+
> **Parameter Limits**:
32
+
>
33
+
> All `array` type parameters in API requests have a maximum length limit of `1000`.
34
+
35
+
### API Call Process
36
+
37
+
1.**Obtain APP Administrator Token**:
38
+
39
+
Use the [`user_token API`](./apis/authenticationManagement/getAdminToken) to obtain the administrator token.
40
+
41
+
2.**Call Other APIs**:
42
+
43
+
Add the obtained APP administrator token to the HTTP request header, and then call other REST APIs.
0 commit comments