Skip to content

feat: support feishu (China) region alongside lark (international) #1

Description

@dofine

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions