Skip to content

Commit 9e0a87e

Browse files
committed
doc
1 parent 1081f59 commit 9e0a87e

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: API Documentation
3+
sidebar_position: 1
4+
---
5+
6+
# OpenIM Server APIs
7+
8+
## 🚀 REST API
9+
10+
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.
44+

0 commit comments

Comments
 (0)