router-for-me/CLIProxyAPI · error
callback URL missing code
Error message
callback URL missing code
What it means
Error "callback URL missing code" thrown in router-for-me/CLIProxyAPI.
Source
Thrown at internal/misc/oauth.go:111
if errDesc == "" {
errDesc = strings.TrimSpace(fragQuery.Get("error_description"))
}
}
}
if code != "" && state == "" && strings.Contains(code, "#") {
parts := strings.SplitN(code, "#", 2)
code = parts[0]
state = parts[1]
}
if errCode == "" && errDesc != "" {
errCode = errDesc
errDesc = ""
}
if code == "" && errCode == "" {
return nil, fmt.Errorf("callback URL missing code")
}
return &OAuthCallback{
Code: code,
State: state,
Error: errCode,
ErrorDescription: errDesc,
}, nil
}
View on GitHub (pinned to 78f0c4079e)
Solutions
- Ensure the OAuth provider redirected with a code query parameter.
- Check for an error parameter in the callback and handle the provider error instead.
When it happens
Trigger: Thrown at internal/misc/oauth.go:111 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/6e59873dc23dd082.
Report an issue: GitHub.