|
| 1 | +--- |
| 2 | +sidebar_position: 13 |
| 3 | +title: Chat Common Configuration |
| 4 | +--- |
| 5 | + |
| 6 | +## Chat Common Configuration |
| 7 | + |
| 8 | +| Configuration Field Name | Configuration File | Configuration Description | Modification Notes | |
| 9 | +| ------------------------ | -------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
| 10 | +| `api.ports` | `chat-api-chat.yml` | Port for Chat service API | Default is `10008` | |
| 11 | +| `api.ports` | `chat-api-admin.yml` | Port for Chat admin panel API | Default is `10009` | |
| 12 | +| `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. | |
| 13 | +| `tokenPolicy.expire` | `chat-rpc-admin.yml` | Expiration time configuration for Chat admin panel Token | The unit of expire is days, default is 90 | |
| 14 | +| `secret` | `chat-rpc-admin.yml` | Chat admin panel secret | Default is `chat123` | |
| 15 | +| `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 | |
| 16 | +| `allowRegister` | `chat-rpc-chat.yml` | Whether to allow user registration | Default is true | |
| 17 | +| `verifyCode` | `chat-rpc-chat.yml` | Verification code related configuration | See [Verification Code verifyCode](#verification-code-verifycode) for details. | |
| 18 | +| `liveKit.url` | `chat-rpc-chat.yml` | URL of LiveKit server, including address and port | Default is `ws://127.0.0.1:7880` | |
| 19 | + |
| 20 | +## Verification Code verifyCode |
| 21 | + |
| 22 | +| **Configuration Option** | **Description** | |
| 23 | +| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 24 | +| validTime | Verification code validity period in seconds, default is 5 minutes. | |
| 25 | +| validCount | Maximum number of verification attempts for a single verification code. | |
| 26 | +| uintTime | Count cycle unit time in seconds. Default is 86400 seconds (one day). | |
| 27 | +| maxCount | Maximum number of verification attempts for a single verification code. | |
| 28 | +| 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"`. | |
| 29 | +| len | Length of the generated verification code. | |
| 30 | +| **phone** | **Parameters related to phone verification code configuration** | |
| 31 | +| 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`. | |
| 32 | +| **phone.ali** | **Parameters related to Alibaba Cloud SMS verification service configuration** | |
| 33 | +| phone.ali.endpoint | Alibaba Cloud SMS service API endpoint. | |
| 34 | +| phone.ali.accessKeyId | AccessKey ID of Alibaba Cloud account. | |
| 35 | +| phone.ali.accessKeySecret | AccessKey secret of Alibaba Cloud account. | |
| 36 | +| phone.ali.signName | Signature name displayed when sending SMS. | |
| 37 | +| phone.ali.verificationCodeTemplateCode | Alibaba Cloud SMS template ID, used to send verification codes. | |
| 38 | +| **mail** | **Parameters related to email verification code configuration** | |
| 39 | +| 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`. | |
| 40 | +| mail.title | Email subject for sending verification code. | |
| 41 | +| mail.senderMail | Email address used to send verification codes. | |
| 42 | +| mail.senderAuthorizationCode | Authorization code for the email. | |
| 43 | +| mail.smtpAddr | SMTP server address. | |
| 44 | +| mail.smtpPort | SMTP server port. | |
0 commit comments