AlistGo/alist · error

empty ClientID or ClientSecret

Error message

empty ClientID or ClientSecret

What it means

Error "empty ClientID or ClientSecret" thrown in AlistGo/alist.

Source

Thrown at drivers/aliyundrive_open/util.go:42

type refreshRateLimitError struct {
	message    string
	retryAfter time.Duration
}

func (e *refreshRateLimitError) Error() string {
	if e.retryAfter > 0 {
		return fmt.Sprintf("%s, retry after %s", e.message, e.retryAfter.Round(time.Second))
	}
	return e.message
}

func (d *AliyundriveOpen) _refreshToken(ctx context.Context) (string, string, error) {
	if d.OauthTokenURL != "" && d.ClientID == "" {
		return d.refreshTokenWithOnlineAPI(ctx)
	}

	if d.ClientID == "" || d.ClientSecret == "" {
		return "", "", fmt.Errorf("empty ClientID or ClientSecret")
	}
	return d.refreshTokenWithPost(ctx, API_URL+"/oauth/access_token")
}

func (d *AliyundriveOpen) refreshTokenWithOnlineAPI(ctx context.Context) (string, string, error) {
	// New hosted renew endpoint uses a GET API and returns {"refresh_token","access_token","text"}.
	// Older hosted endpoints still expect the legacy POST payload, so we fall back when we detect that shape.
	var resp struct {
		RefreshToken string `json:"refresh_token"`
		AccessToken  string `json:"access_token"`
		ErrorMessage string `json:"text"`
	}
	var e ErrResp
	if err := d.wait(ctx, limiterOther); err != nil {
		return "", "", err
	}
	res, err := base.RestyClient.R().
		SetResult(&resp).

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Ensure the referenced value is configured and non-empty, then retry the operation.

When it happens

Trigger: Thrown at drivers/aliyundrive_open/util.go:42 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/b00adfc06560818a. Report an issue: GitHub.