larksuite/cli · error
app registration denied by user
Error message
app registration denied by user
What it means
Terminal outcome sentinel of the device-code app registration flow: the authorization request was delivered but the user explicitly rejected it, so the poll loop stops with this error instead of continuing. Exposed so callers such as config init can classify denial distinctly from expiry and timeout.
Source
Thrown at internal/auth/app_registration.go:22
package auth
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strings"
"time"
"github.com/larksuite/cli/internal/core"
)
// Terminal registration outcomes, exposed for typed classification by callers.
var (
ErrRegistrationDenied = errors.New("app registration denied by user")
ErrRegistrationExpired = errors.New("device code expired, please try again")
ErrRegistrationTimedOut = errors.New("app registration timed out, please try again")
)
// Protocol defaults, mirroring the official SDK registration flow.
const (
registrationBootstrapBrand = core.BrandFeishu
defaultPollIntervalSeconds = 5
defaultExpireInSeconds = 600
beginRequestTimeout = 30 * time.Second
maxPollIntervalSeconds = 60
)
// normalizedInterval clamps a non-positive poll interval to the protocol default.
func normalizedInterval(v int) int {
if v <= 0 {
return defaultPollIntervalSeconds
}View on GitHub (pinned to 7fd6ef3c07)
Solutions
- Re-run `lark-cli config init --new` and approve the authorization request when prompted
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/auth/app_registration.go:22 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04).
Data as JSON: /api/errors/fd347dbc1d269f80.
Report an issue: GitHub.