Versions in this module Expand all Collapse all v1 v1.0.10 Apr 13, 2026 v1.0.9 Apr 11, 2026 v1.0.8 Apr 10, 2026 v1.0.7 Apr 9, 2026 v1.0.6 Apr 8, 2026 v1.0.5 Apr 7, 2026 v1.0.4 Apr 3, 2026 Changes in this version + const PathAppRegistration + const PathApplicationInfoV6Prefix + const PathDeviceAuthorization + const PathOAuthTokenV2 + const PathUserInfoV1 + func ApplicationInfoPath(appId string) string v1.0.3 Apr 2, 2026 v1.0.2 Apr 1, 2026 v1.0.1 Mar 31, 2026 v1.0.0 Mar 28, 2026 Changes in this version + const LarkErrBlockByPolicy + const LarkErrBlockByPolicyTryAuth + var RefreshTokenRetryable = map[int]bool + var TokenRetryCodes = map[int]bool + func BuildVerificationURL(baseURL, cliVersion string) string + func GetValidAccessToken(httpClient *http.Client, opts UATCallOptions) (string, error) + func MaskToken(token string) string + func MissingScopes(storedScope string, required []string) []string + func RemoveStoredToken(appId, userOpenId string) error + func SetStoredToken(token *StoredUAToken) error + func TokenStatus(token *StoredUAToken) string + func VerifyUserToken(ctx context.Context, sdk *lark.Client, accessToken string) error + type AppRegUserInfo struct + OpenID string + TenantBrand string + type AppRegistrationResponse struct + DeviceCode string + ExpiresIn int + Interval int + UserCode string + VerificationUri string + VerificationUriComplete string + func RequestAppRegistration(httpClient *http.Client, brand core.LarkBrand, errOut io.Writer) (*AppRegistrationResponse, error) + type AppRegistrationResult struct + ClientID string + ClientSecret string + UserInfo *AppRegUserInfo + func PollAppRegistration(ctx context.Context, httpClient *http.Client, brand core.LarkBrand, ...) (*AppRegistrationResult, error) + type DeviceAuthResponse struct + DeviceCode string + ExpiresIn int + Interval int + UserCode string + VerificationUri string + VerificationUriComplete string + func RequestDeviceAuthorization(httpClient *http.Client, appId, appSecret string, brand core.LarkBrand, ...) (*DeviceAuthResponse, error) + type DeviceFlowResult struct + Error string + Message string + OK bool + Token *DeviceFlowTokenData + func PollDeviceToken(ctx context.Context, httpClient *http.Client, appId, appSecret string, ...) *DeviceFlowResult + type DeviceFlowTokenData struct + AccessToken string + ExpiresIn int + RefreshExpiresIn int + RefreshToken string + Scope string + type NeedAuthorizationError struct + UserOpenId string + func (e *NeedAuthorizationError) Error() string + type OAuthEndpoints struct + DeviceAuthorization string + Token string + func ResolveOAuthEndpoints(brand core.LarkBrand) OAuthEndpoints + type SecurityPolicyError struct + CLIHint string + ChallengeURL string + Code int + Err error + Message string + func (e *SecurityPolicyError) Error() string + func (e *SecurityPolicyError) Unwrap() error + type SecurityPolicyTransport struct + Base http.RoundTripper + func (t *SecurityPolicyTransport) RoundTrip(req *http.Request) (*http.Response, error) + type StoredUAToken struct + AccessToken string + AppId string + ExpiresAt int64 + GrantedAt int64 + RefreshExpiresAt int64 + RefreshToken string + Scope string + UserOpenId string + func GetStoredToken(appId, userOpenId string) *StoredUAToken + type UATCallOptions struct + AppId string + AppSecret string + Domain core.LarkBrand + ErrOut io.Writer + UserOpenId string + func NewUATCallOptions(cfg *core.CliConfig, errOut io.Writer) UATCallOptions + type UATStatus struct + Authorized bool + ExpiresAt int64 + GrantedAt int64 + RefreshExpiresAt int64 + Scope string + TokenStatus string + UserOpenId string