Skip to main content

Chat Common Configuration

Chat Common Configuration

Configuration Field NameConfiguration FileConfiguration DescriptionModification Notes
api.portschat-api-chat.ymlPort for Chat service APIDefault is 10008
api.portschat-api-admin.ymlPort for Chat admin panel APIDefault is 10009
openIM.secretshare.ymlIM server secret, used to maintain communication with the serverDefault is openIM123, can be changed to any string, must be consistent with the server secret.
tokenPolicy.expirechat-rpc-admin.ymlExpiration time configuration for Chat admin panel TokenThe unit of expire is days, default is 90
secretchat-rpc-admin.ymlChat admin panel secretDefault is chat123
remainLogLevellog.ymlLog level0: 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
allowRegisterchat-rpc-chat.ymlWhether to allow user registrationDefault is true
verifyCodechat-rpc-chat.ymlVerification code related configurationSee Verification Code verifyCode for details.
liveKit.urlchat-rpc-chat.ymlURL of LiveKit server, including address and portDefault is ws://127.0.0.1:7880

Verification Code verifyCode

Configuration OptionDescription
validTimeVerification code validity period in seconds, default is 5 minutes.
validCountMaximum number of verification attempts for a single verification code.
uintTimeCount cycle unit time in seconds. Default is 86400 seconds (one day).
maxCountMaximum number of verification attempts for a single verification code.
superCodeSuper 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".
lenLength of the generated verification code.
phoneParameters related to phone verification code configuration
phone.usePhone 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.aliParameters related to Alibaba Cloud SMS verification service configuration
phone.ali.endpointAlibaba Cloud SMS service API endpoint.
phone.ali.accessKeyIdAccessKey ID of Alibaba Cloud account.
phone.ali.accessKeySecretAccessKey secret of Alibaba Cloud account.
phone.ali.signNameSignature name displayed when sending SMS.
phone.ali.verificationCodeTemplateCodeAlibaba Cloud SMS template ID, used to send verification codes.
mailParameters related to email verification code configuration
mail.useEmail 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.titleEmail subject for sending verification code.
mail.senderMailEmail address used to send verification codes.
mail.senderAuthorizationCodeAuthorization code for the email.
mail.smtpAddrSMTP server address.
mail.smtpPortSMTP server port.