router-for-me/CLIProxyAPI · error
fetch Claude OAuth profile: response account UUID is empty
Error message
fetch Claude OAuth profile: response account UUID is empty
What it means
Error "fetch Claude OAuth profile: response account UUID is empty" thrown in router-for-me/CLIProxyAPI.
Source
Thrown at internal/auth/claude/anthropic_auth.go:271
}
if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusMultipleChoices {
return nil, fmt.Errorf("fetch Claude OAuth %s failed with status %d", label, resp.StatusCode)
}
return body, nil
}
// FetchOAuthProfile retrieves the account identity associated with an OAuth access token.
func (o *ClaudeAuth) FetchOAuthProfile(ctx context.Context, accessToken string) (*OAuthProfile, error) {
body, errFetch := o.fetchOAuthControlPlaneJSON(ctx, ProfileURL, accessToken, "profile")
if errFetch != nil {
return nil, errFetch
}
var profile OAuthProfile
if errUnmarshal := json.Unmarshal(body, &profile); errUnmarshal != nil {
return nil, fmt.Errorf("parse Claude OAuth profile response: %w", errUnmarshal)
}
if strings.TrimSpace(profile.Account.UUID) == "" {
return nil, fmt.Errorf("fetch Claude OAuth profile: response account UUID is empty")
}
return &profile, nil
}
// FetchOAuthRoles performs the claude_cli roles lookup the native client issues
// alongside the profile query after a token exchange. Only the request shape is
// covered by captured evidence, so the payload stays opaque and is returned raw
// instead of being decoded into a guessed structure.
func (o *ClaudeAuth) FetchOAuthRoles(ctx context.Context, accessToken string) (json.RawMessage, error) {
body, errFetch := o.fetchOAuthControlPlaneJSON(ctx, RolesURL, accessToken, "claude_cli roles")
if errFetch != nil {
return nil, errFetch
}
if !json.Valid(body) {
return nil, fmt.Errorf("parse Claude OAuth claude_cli roles response: body is not valid JSON")
}
return json.RawMessage(body), nil
}View on GitHub (pinned to 78f0c4079e)
Solutions
- Re-run the Claude OAuth login flow so the profile response includes the account UUID.
- Verify the access token has the scopes required to read the account profile.
When it happens
Trigger: Thrown at internal/auth/claude/anthropic_auth.go:271 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15).
Data as JSON: /api/errors/220dbeda9c76c976.
Report an issue: GitHub.