Summary
All API endpoints were hardcoded to larksuite.com. Added LARK_REGION config to switch between Lark (international) and Feishu (China) environments.
Changes
internal/config/config.go: Added region field, LARK_REGION env var (default lark), GetRegion() and GetBaseURL()
internal/auth/oauth.go: Replaced hardcoded URL constants with dynamic functions based on region
internal/api/client.go, internal/api/messages.go: baseURL replaced with config.GetBaseURL()
Usage
Set LARK_REGION=feishu (env var) or region: feishu (config.yaml) to use feishu.cn endpoints.
| Region |
Auth |
API |
| lark (default) |
accounts.larksuite.com |
open.larksuite.com |
| feishu |
accounts.feishu.cn |
open.feishu.cn |
Summary
All API endpoints were hardcoded to
larksuite.com. AddedLARK_REGIONconfig to switch between Lark (international) and Feishu (China) environments.Changes
internal/config/config.go: Addedregionfield,LARK_REGIONenv var (defaultlark),GetRegion()andGetBaseURL()internal/auth/oauth.go: Replaced hardcoded URL constants with dynamic functions based on regioninternal/api/client.go,internal/api/messages.go:baseURLreplaced withconfig.GetBaseURL()Usage
Set
LARK_REGION=feishu(env var) orregion: feishu(config.yaml) to use feishu.cn endpoints.