Skip to content

fix: use configured base URL for QR login (all SDKs)#83

Open
jeffkit wants to merge 1 commit into
corespeed-io:mainfrom
jeffkit:fix/qr-login-respect-configured-base-url
Open

fix: use configured base URL for QR login (all SDKs)#83
jeffkit wants to merge 1 commit into
corespeed-io:mainfrom
jeffkit:fix/qr-login-respect-configured-base-url

Conversation

@jeffkit

@jeffkit jeffkit commented Jun 6, 2026

Copy link
Copy Markdown

Summary

QR login (get_bot_qrcode / get_qrcode_status) previously always called https://ilinkai.weixin.qq.com, ignoring BotOptions.baseUrl / Options.BaseURL / options.baseUrl / base_url.

Message APIs already respected the configured base URL. This change aligns the login path so clients can pair through local proxy hubs (e.g. iLink Hub) by only setting WEIXIN_BASE_URL.

Changes

SDK File
Rust rust/src/bot.rs
Go golang/internal/auth/login.go
Node.js nodejs/src/auth/authenticator.ts
Python python/wechatbot/auth.py

IDC redirect (scaned_but_redirect) behavior is unchanged — polling may still switch to redirect_host when returned by Tencent.

Test plan

  • cargo test in rust/ (46 tests pass)
  • Point baseUrl at a mock hub; verify get_bot_qrcode hits the mock, not Tencent
  • Default behavior unchanged when baseUrl is omitted (still ilinkai.weixin.qq.com)

Made with Cursor

QR code fetch and status polling previously always hit
ilinkai.weixin.qq.com even when BotOptions.baseUrl pointed at a
local proxy hub (e.g. iLink Hub). Message APIs already respected
baseUrl; this aligns the login path for hub pairing and custom
gateways.

Affected: Rust, Go, Node.js, Python SDKs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant