-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update user and group management API documentation
- Loading branch information
Showing
7 changed files
with
364 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
title: 更新用户信息Ex之后的回调 | ||
hide_title: true | ||
--- | ||
|
||
# 更新用户信息Ex之后的回调 | ||
|
||
## 功能说明 | ||
App 业务服务端可以通过该回调获取用户更新个人信息后的结果,App 后台可以据此进行数据同步等操作。 | ||
|
||
## 注意事项 | ||
- 为启用回调,必须配置回调 URL,并开启本条回调协议对应的开关。配置方法详见 [回调说明](../introduction) 文档。 | ||
- 回调的方向是 OpenIMServer 向 App 后台发起 HTTP/HTTPS POST 请求。 | ||
- APP 业务服务端需在超时时间内响应此请求。 | ||
|
||
## 可能触发该回调的场景 | ||
- App 用户通过客户端更新个人信息。 | ||
- App 管理员通过 REST API 更新用户信息。 | ||
|
||
## 回调发生时机 | ||
- OpenIMServer 处理完用户信息更新请求之后。 | ||
|
||
## 接口说明 | ||
|
||
### 请求 URL 示例 | ||
以下示例中 App 配置的回调 URL 为 `http://www.example.com/callbackCommand?contenttype=json`。 | ||
```plaintext | ||
http://www.example.com/callbackAfterUpdateUserInfoCommand?contenttype=json | ||
``` | ||
|
||
### 请求参数说明 | ||
|
||
| 参数 | 说明 | | ||
|-----------------|-----------------------------------------------| | ||
| http | 请求协议为 HTTP,请求方式为 POST | | ||
| www.example.com | configy.yaml 中的 callback.url 字段,域名或主机名 | | ||
| CallbackCommand | 此处为:callbackAfterUpdateUserInfoCommand | | ||
| contenttype | 固定值为:JSON | | ||
|
||
### Header | ||
| header名 | 示例值 | 选填 | 类型 | 说明 | | ||
|:------------|:--------------|:----|--------|---------------------| | ||
| operationID | 1646445464564 | 必填 | string | operationID用于全局链路追踪 | | ||
|
||
### 请求包示例 | ||
```json | ||
{ | ||
"callbackCommand": "callbackAfterUpdateUserInfoCommand", | ||
"userID": "user123", | ||
"nickName": "John Doe", | ||
"faceURL": "http://example.com/path/to/face/image.png", | ||
"ex": "Extra data" | ||
} | ||
``` | ||
|
||
### 请求包字段说明 | ||
|
||
| 字段 | 类型 | 描述 | | ||
|----------------|---------|---------------------------------| | ||
| callbackCommand | string | 回调命令,这里是更新用户信息之后的回调 | | ||
| userID | string | 用户的唯一标识符 | | ||
| nickName | StringValue | 用户的昵称 | | ||
| faceURL | StringValue | 用户头像的URL | | ||
| ex | StringValue | 额外的数据字段 | | ||
|
||
## 应答包示例 | ||
App 后台同步数据后,发送回调应答包。 | ||
|
||
```json | ||
{ | ||
"actionCode": 0, | ||
"errCode": 0, | ||
"errMsg": "Success", | ||
"errDlt": "", | ||
"nextCode": 1 | ||
} | ||
|
||
``` | ||
|
||
|
||
|
||
## 应答包字段说明 | ||
|
||
| 字段 | 值 | 说明 | | ||
|-------------|------------------------------|------------------------------------------| | ||
| actionCode | 0 | 表示业务系统的回调是否正确执行。`0`表示操作成功。 | | ||
| errCode | 0 | 表示自定义错误码,此处填0代表忽略回调结果。| | ||
| errMsg | "An error message" | 自定义错误码对应的简单错误信息。| | ||
| errDlt | "Detailed error information" | 自定义错误码对应的详细错误信息。| | ||
| nextCode | 1 | 下一步执行指令,`1`表示拒绝继续执行,actionCode等于`0`时设置。| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
title: 更新用户信息Ex之前的回调 | ||
hide_title: true | ||
--- | ||
|
||
# 更新用户信息Ex之前的回调 | ||
|
||
## 功能说明 | ||
App 业务服务端可以通过该回调获取用户更新个人信息的请求,或对请求做修改和干预。 | ||
|
||
## 注意事项 | ||
- 为启用回调,必须配置回调 URL,并开启本条回调协议对应的开关。配置方法详见 [回调说明](../introduction) 文档。 | ||
- 回调的方向是 OpenIMServer 向 App 后台发起 HTTP/HTTPS POST 请求。 | ||
- APP 业务服务端需在超时时间内响应此请求。 | ||
|
||
## 可能触发该回调的场景 | ||
- App 用户通过客户端更新个人信息。 | ||
- App 管理员通过 REST API 更新用户信息。: | ||
|
||
|
||
## 回调发生时机 | ||
- OpenIMServer 准备更新用户信息之前。 | ||
|
||
## 接口说明 | ||
|
||
### 请求 URL 示例 | ||
以下示例中 App 配置的回调 URL 为 `http://www.example.com/callbackCommand?contenttype=json`。 | ||
```plaintext | ||
http://www.example.com/callbackBeforeUpdateUserInfoExCommand?contenttype=json | ||
``` | ||
|
||
### 请求参数说明 | ||
|
||
| 参数 | 说明 | | ||
|-----------------|-----------------------------------------------| | ||
| http | 请求协议为 HTTP,请求方式为 POST | | ||
| www.example.com | configy.yaml 中的 callback.url 字段,域名或主机名 | | ||
| CallbackCommand | callbackBeforeUpdateUserInfoExCommand | | ||
| contenttype | 固定值为:JSON | | ||
|
||
### Header | ||
| header名 | 示例值 | 选填 | 类型 | 说明 | | ||
|:------------|:--------------|:----|--------|---------------------| | ||
| operationID | 1646445464564 | 必填 | string | operationID用于全局链路追踪 | | ||
|
||
|
||
### 请求包示例 | ||
```json | ||
{ | ||
"callbackCommand": "callbackBeforeUpdateUserInfoExCommand", | ||
"userID": "user123", | ||
"nickName": "John Doe", | ||
"faceURL": "http://example.com/path/to/face/image.png", | ||
"ex": "Extra data" | ||
} | ||
``` | ||
|
||
### 请求包字段说明 | ||
|
||
| 字段 | 类型 | 描述 | | ||
|----------------|---------|---------------------------------| | ||
| callbackCommand | string | 回调命令,这里是更新用户信息之前的回调 | | ||
| userID | string | 用户的唯一标识符 | | ||
| nickName | StringValue | 用户的昵称 | | ||
| faceURL | StringValue | 用户头像的URL | | ||
| ex | StringValue | 额外的数据字段 | | ||
|
||
## 应答包示例 | ||
|
||
### 允许更新 | ||
允许用户更新信息。 | ||
|
||
```json | ||
{ | ||
"actionCode": 0, | ||
"errCode": 0, | ||
"errMsg": "Success", | ||
"errDlt": "", | ||
"nextCode": "0", | ||
"nickName": "John Doe Updated", | ||
"faceURL": "http://example.com/new/face/image.png", | ||
"ex": "Updated extra data" | ||
} | ||
``` | ||
|
||
## 应答包字段说明 | ||
|
||
| 字段 | 值 | 说明 | | ||
|------------|------------------------------|-------------------------------------------------------------------| | ||
| actionCode | 0 | 表示业务系统的回调是否正确执行。`0`表示操作成功。 | | ||
| errCode | 5001 | 表示自定义错误码,范围在5000-9999之间。在 actionCode 不等于0时设置;在 nextCode 等于1时设置。| | ||
| errMsg | "An error message" | 自定义错误码对应的简单错误信息。 | | ||
| errDlt | "Detailed error information" | 自定义错误码对应的详细错误信息。 | | ||
| nextCode | 1 | 下一步执行指令,`1`表示拒绝继续执行,actionCode 等于`0`时设置。 | | ||
| nickName | StringValue | 用户的昵称 | | ||
| faceURL | StringValue | 用户头像的URL | | ||
| ex | StringValue | 额外的数据字段 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
...rus-plugin-content-docs-restapi/current/webhooks/user/updateUserInfoExAfter.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Callback After Updating User Information Ex | ||
|
||
## Function Description | ||
The App business server can use this callback to get the results after a user updates their personal information. The backend can use this information for data synchronization and other operations. | ||
|
||
## Precautions | ||
- To enable the callback, it is necessary to configure the callback URL and activate the corresponding switch for this callback protocol. Configuration methods can be found in the [Callback Explanation](../introduction) document. | ||
- The direction of the callback is an HTTP/HTTPS POST request initiated by OpenIMServer to the App backend. | ||
- After receiving the callback request, the App business server must verify whether the command parameter in the request URL is its SDKNAME parameter. | ||
- The APP business server must respond to this request within the timeout period. | ||
|
||
## Scenarios That May Trigger This Callback | ||
- App users update their personal information through the client. | ||
- App administrators update user information through the REST API. | ||
|
||
## Timing of the Callback | ||
- After OpenIMServer has processed the user information update request. | ||
|
||
## Interface Description | ||
|
||
### Request URL Example | ||
In the following example, the callback URL configured by the App is `https://callbackurl`. | ||
```plaintext | ||
https://callbackurl?command=$CallbackCommand&contenttype=json | ||
``` | ||
|
||
### Request Parameter Description | ||
|
||
| Parameter | Description | | ||
|----------------------|------------------------------------------------------| | ||
| https | Request protocol is HTTPS, method is POST | | ||
| https://callbackurl | Callback URL | | ||
| CallbackCommand | Fixed value: callbackAfterUpdateUserInfoCommand | | ||
| contenttype | Fixed value: JSON | | ||
|
||
### Header | ||
| Header Name | Example Value | Mandatory | Type | Description | | ||
|-------------|---------------|-----------|--------|-------------------------------------| | ||
| operationID | 1646445464564 | Required | string | operationID for global link tracing | | ||
|
||
### Request Packet Example | ||
```json | ||
{ | ||
"callbackCommand": "callbackAfterUpdateUserInfoCommand", | ||
"userID": "user123", | ||
"nickName": "John Doe", | ||
"faceURL": "http://example.com/path/to/face/image.png", | ||
"ex": "Extra data" | ||
} | ||
``` | ||
|
||
### Request Packet Field Explanation | ||
|
||
| Field | Type | Description | | ||
|-----------------|---------|-------------------------------------------| | ||
| callbackCommand | string | Callback command, here for after updating user information | | ||
| userID | string | The unique identifier of the user | | ||
| nickName | string | The nickname of the user | | ||
| faceURL | string | URL of the user's avatar | | ||
| ex | string | Additional data fields | | ||
|
||
## Response Packet Example | ||
The App backend sends a callback response packet after syncing data. | ||
|
||
```json | ||
{ | ||
"actionCode": 0, | ||
"errCode": 0, | ||
"errMsg": "Success", | ||
"errDlt": "", | ||
"nextCode": 1 | ||
} | ||
``` | ||
|
||
## Response Packet Field Explanation | ||
|
||
| Field | Value | Description | | ||
|------------|--------|----------------------------------------------------------| | ||
| actionCode | 0 | Indicates if the business system's callback was executed correctly. `0` means the operation was successful. | | ||
| errCode | 0 | Custom error code, here 0 means ignore the callback result. | | ||
| errMsg | "An error message" | Simple error message corresponding to the custom error code. | | ||
| errDlt | "Detailed error information" | Detailed error information corresponding to the custom error code. | | ||
| nextCode | 1 | Next step instruction, `1` means to refuse to continue executing, set when actionCode is `0`. | |
91 changes: 91 additions & 0 deletions
91
...us-plugin-content-docs-restapi/current/webhooks/user/updateUserInfoExBefore.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Callback Before Updating User Information Ex | ||
|
||
## Function Description | ||
The App business server can use this callback to receive requests from users to update their personal information. Additionally, the business server can modify and intervene in the request. | ||
|
||
## Precautions | ||
- To enable the callback, it is necessary to configure the callback URL and activate the corresponding switch for this callback protocol. Configuration methods can be found in the [Callback Explanation](../introduction) document. | ||
- The direction of the callback is an HTTP/HTTPS POST request initiated by OpenIMServer to the App backend. | ||
- After receiving the callback request, the App business server must verify whether the command parameter in the request URL is its SDKNAME parameter. | ||
- The APP business server must respond to this request within the timeout period. | ||
|
||
## Scenarios That May Trigger This Callback | ||
- App users update their personal information through the client. | ||
- App administrators update user information through the REST API. | ||
|
||
## Timing of the Callback | ||
- Before OpenIMServer prepares to update user information. | ||
|
||
## Interface Description | ||
|
||
### Request URL Example | ||
In the following example, the callback URL configured by the App is `https://callbackurl`. | ||
```plaintext | ||
https://callbackurl?command=$CallbackCommand&contenttype=json | ||
``` | ||
|
||
### Request Parameter Description | ||
|
||
| Parameter | Description | | ||
|----------------------|------------------------------------------------------| | ||
| https | Request protocol is HTTPS, method is POST | | ||
| https://callbackurl | Callback URL | | ||
| CallbackCommand | Fixed value: callbackBeforeUpdateUserInfoExCommand | | ||
| contenttype | Fixed value: JSON | | ||
|
||
### Header | ||
| Header Name | Example Value | Mandatory | Type | Description | | ||
|-------------|---------------|-----------|--------|-------------------------------------| | ||
| operationID | 1646445464564 | Required | string | operationID for global link tracing | | ||
|
||
### Request Packet Example | ||
```json | ||
{ | ||
"callbackCommand": "callbackBeforeUpdateUserInfoExCommand", | ||
"userID": "user123", | ||
"nickName": "John Doe", | ||
"faceURL": "http://example.com/path/to/face/image.png", | ||
"ex": "Extra data" | ||
} | ||
``` | ||
|
||
### Request Packet Field Explanation | ||
|
||
| Field | Type | Description | | ||
|-----------------|---------|-------------------------------------------| | ||
| callbackCommand | string | Callback command, here for before updating user information | | ||
| userID | string | The unique identifier of the user | | ||
| nickName | StringValue | The nickname of the user | | ||
| faceURL | StringValue | URL of the user's avatar | | ||
| ex | StringValue | Additional data fields | | ||
|
||
## Response Packet Example | ||
|
||
### Allow Update | ||
Allows the user to update their information. | ||
|
||
```json | ||
{ | ||
"actionCode": 0, | ||
"errCode": 0, | ||
"errMsg": "Success", | ||
"errDlt": "", | ||
"nextCode": "0", | ||
"nickName": "John Doe Updated", | ||
"faceURL": "http://example.com/new/face/image.png", | ||
"ex": "Updated extra data" | ||
} | ||
``` | ||
|
||
## Response Packet Field Explanation | ||
|
||
| Field | Value | Description | | ||
|------------|--------|----------------------------------------------------------| | ||
| actionCode | 0 | Indicates if the business system's callback was executed correctly. `0` means the operation was successful. | | ||
| errCode | 5001 | Custom error code, ranging between 5000-9999. Set when actionCode is not 0; set when nextCode is not 1. | | ||
| errMsg | "An error message" | Simple error message corresponding to the custom error code. | | ||
| errDlt | "Detailed error information" | Detailed error information corresponding to the custom error code. | | ||
| nextCode | 1 | Next step instruction, `1` means to refuse to continue executing, set when actionCode is `0`. | | ||
| nickName | StringValue | The nickname of the user. | | ||
| faceURL | StringValue | URL of the user's updated avatar. | | ||
| ex | StringValue | Updated additional data fields. | |