diff --git a/docs/restapi/commonChatConfigs.mdx b/docs/restapi/commonChatConfigs.mdx new file mode 100644 index 0000000000..62181cd472 --- /dev/null +++ b/docs/restapi/commonChatConfigs.mdx @@ -0,0 +1,44 @@ +--- +sidebar_position: 13 +title: Chat常用配置项修改说明 +--- + +## Chat 常用配置项 + +| 配置字段名称 | 配置项所在文件 | 配置项说明 | 修改说明 | +| -------------------- | -------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- | +| `api.ports` | `chat-api-chat.yml` | Chat 服务端 api 端口 | 默认为`10008` | +| `api.ports` | `chat-api-admin.yml` | Chat 管理后台 api 端口 | 默认为`10009` | +| `openIM.secret` | `share.yml` | IM 服务端密钥,用于与服务端保持通信 | 默认为 `openIM123`,可更改为任意字符串,需要与服务端密钥保持一致。 | +| `tokenPolicy.expire` | `chat-rpc-admin.yml` | Chat 管理后台 Token 过期时间配置 | expire 的单位为天,默认为 90 | +| `secret` | `chat-rpc-admin.yml` | Chat 管理后台密钥 | 默认为 `chat123` | +| `remainLogLevel` | `log.yml` | 日志级别 | 6:带有调试信息的详细日志,建议开发环境使用;4:info 及关键日志,建议生产环境使用; | +| `allowRegister` | `chat-rpc-chat.yml` | 是否允许用户注册 | 默认为 true | +| `verifyCode` | `chat-rpc-chat.yml` | 验证码相关配置 | 具体参考[验证码 verifyCode](#验证码-verifyCode)。 | +| `liveKit.url` | `chat-rpc-chat.yml` | LiveKit 服务器的 URL,包括地址和端口 | 默认为`ws://127.0.0.1:7880` | + +## 验证码 verifyCode + +| **配置选项** | **说明** | +| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| validTime | 验证码有效时间,验证码的有效时间,单位为秒,默认为 5 分钟。 | +| validCount | 单个验证码最大验证尝试次数。 | +| uintTime | 计数周期单位时间,单位为秒。默认为 86400 秒(一天) | +| maxCount | 单个验证码最大验证尝试次数。 | +| superCode | 超级验证码,当`phone.use` 或 `mail.use` 的值为`"superCode"`时,使用此字段的值为验证码。默认为`"666666"` | +| len | 生成的验证码长度。 | +| **phone** | **手机验证码配置相关参数** | +| phone.use | 手机验证码生成方式,有`superCode`和`ali`两种,superCode 是默认预设的验证码,ali 是接入阿里云的短信服务。默认为`superCode`。 | +| **phone.ali** | **阿里云短信验证服务配置相关参数** | +| phone.ali.endpoint | 阿里云短信服务 API 接入点。 | +| phone.ali.accessKeyId | 阿里云账号的 AccessKey ID。 | +| phone.ali.accessKeySecret | 阿里云账号的 AccessKey 密钥。 | +| phone.ali.signName | 短信发送时显示的签名名称。 | +| phone.ali.verificationCodeTemplateCode | 阿里云短信模板 ID,用于发送验证码。 | +| **mail** | **邮件验证码配置相关参数** | +| mail.use | 手机验证码生成方式,有`superCode`和`mail`两种,superCode 是默认预设的验证码,mail 是接入自定义的 SMTP 服务。默认为`superCode`。 | +| mail.title | 发送验证码的邮件标题。 | +| mail.senderMail | 发送验证码的邮箱号。 | +| mail.senderAuthorizationCode | 邮箱的授权码。 | +| mail.smtpAddr | SMTP 服务器地址。 | +| mail.smtpPort | SMTP 服务器端口。 | diff --git a/i18n/en/docusaurus-plugin-content-docs-restapi/current/commonChatConfigs.mdx b/i18n/en/docusaurus-plugin-content-docs-restapi/current/commonChatConfigs.mdx new file mode 100644 index 0000000000..03a2888281 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs-restapi/current/commonChatConfigs.mdx @@ -0,0 +1,44 @@ +--- +sidebar_position: 13 +title: Chat Common Configuration +--- + +## Chat Common Configuration + +| Configuration Field Name | Configuration File | Configuration Description | Modification Notes | +| ------------------------ | -------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `api.ports` | `chat-api-chat.yml` | Port for Chat service API | Default is `10008` | +| `api.ports` | `chat-api-admin.yml` | Port for Chat admin panel API | Default is `10009` | +| `openIM.secret` | `share.yml` | IM server secret, used to maintain communication with the server | Default is `openIM123`, can be changed to any string, must be consistent with the server secret. | +| `tokenPolicy.expire` | `chat-rpc-admin.yml` | Expiration time configuration for Chat admin panel Token | The unit of expire is days, default is 90 | +| `secret` | `chat-rpc-admin.yml` | Chat admin panel secret | Default is `chat123` | +| `remainLogLevel` | `log.yml` | Log level | 0: Default allows simultaneous login across multiple devices, 1: All clients can be online but only one per client type, 5: PC can be online simultaneously, other clients allow only one device login | +| `allowRegister` | `chat-rpc-chat.yml` | Whether to allow user registration | Default is true | +| `verifyCode` | `chat-rpc-chat.yml` | Verification code related configuration | See [Verification Code verifyCode](#verification-code-verifycode) for details. | +| `liveKit.url` | `chat-rpc-chat.yml` | URL of LiveKit server, including address and port | Default is `ws://127.0.0.1:7880` | + +## Verification Code verifyCode + +| **Configuration Option** | **Description** | +| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| validTime | Verification code validity period in seconds, default is 5 minutes. | +| validCount | Maximum number of verification attempts for a single verification code. | +| uintTime | Count cycle unit time in seconds. Default is 86400 seconds (one day). | +| maxCount | Maximum number of verification attempts for a single verification code. | +| superCode | Super verification code, when the value of `phone.use` or `mail.use` is `"superCode"`, the value of this field is used as the verification code. Default is `"666666"`. | +| len | Length of the generated verification code. | +| **phone** | **Parameters related to phone verification code configuration** | +| phone.use | Phone verification code generation method, there are two types: `superCode` and `ali`. superCode is the default preset verification code, ali integrates with Alibaba Cloud SMS service. Default is `superCode`. | +| **phone.ali** | **Parameters related to Alibaba Cloud SMS verification service configuration** | +| phone.ali.endpoint | Alibaba Cloud SMS service API endpoint. | +| phone.ali.accessKeyId | AccessKey ID of Alibaba Cloud account. | +| phone.ali.accessKeySecret | AccessKey secret of Alibaba Cloud account. | +| phone.ali.signName | Signature name displayed when sending SMS. | +| phone.ali.verificationCodeTemplateCode | Alibaba Cloud SMS template ID, used to send verification codes. | +| **mail** | **Parameters related to email verification code configuration** | +| mail.use | Email verification code generation method, there are two types: `superCode` and `mail`. superCode is the default preset verification code, mail integrates with custom SMTP service. Default is `superCode`. | +| mail.title | Email subject for sending verification code. | +| mail.senderMail | Email address used to send verification codes. | +| mail.senderAuthorizationCode | Authorization code for the email. | +| mail.smtpAddr | SMTP server address. | +| mail.smtpPort | SMTP server port. |