weixin-ts / bot/src / WeixinBotOptions
Interface: WeixinBotOptions
Defined in: bot/src/types.ts:259
Configuration options for the WeixinBot client
Properties
apiTimeoutMs?
optionalapiTimeoutMs?:number
Defined in: bot/src/types.ts:273
Regular API timeout in ms
Default
15000appId?
optionalappId?:string
Defined in: bot/src/types.ts:267
iLink App ID
baseUrl?
optionalbaseUrl?:string
Defined in: bot/src/types.ts:263
API base URL
Default
'https://ilinkai.weixin.qq.com'cdnBaseUrl?
optionalcdnBaseUrl?:string
Defined in: bot/src/types.ts:265
CDN base URL
Default
'https://novac2c.cdn.weixin.qq.com/c2c'longPollTimeoutMs?
optionallongPollTimeoutMs?:number
Defined in: bot/src/types.ts:271
Long-poll timeout in ms
Default
35000session?
optionalsession?:string
Defined in: bot/src/types.ts:285
Session file path for token persistence. When set, token is automatically saved after login and loaded on next start. Avoids repeated QR scanning across restarts. The file is automatically deleted when the server reports the session is expired.
Example
const bot = new WeixinBot({ session: '.weixin-bot.session.json' })token?
optionaltoken?:string
Defined in: bot/src/types.ts:261
Bot authentication token (can be obtained via login())
version?
optionalversion?:string
Defined in: bot/src/types.ts:269
Client version string (e.g. '1.0.0')