chenhg5/cc-connect · error
matrix: access_token is required
Error message
matrix: access_token is required
What it means
Config validation guard in the Matrix platform factory: the access_token option was absent or not a string in the platform's config.toml section, so the platform cannot authenticate to the homeserver and refuses to construct.
Source
Thrown at platform/matrix/matrix.go:72
httpClient *http.Client
cryptoHelper any //nolint:unused // *cryptohelper.CryptoHelper when built with goolm tag
crossSigningPassword string
}
const (
initialBackoff = 2 * time.Second
maxBackoff = 60 * time.Second
stableWindow = 10 * time.Second
)
func New(opts map[string]any) (core.Platform, error) {
homeserver, _ := opts["homeserver"].(string)
if homeserver == "" {
return nil, fmt.Errorf("matrix: homeserver is required")
}
accessToken, _ := opts["access_token"].(string)
if accessToken == "" {
return nil, fmt.Errorf("matrix: access_token is required")
}
userID, _ := opts["user_id"].(string)
allowFrom, _ := opts["allow_from"].(string)
core.CheckAllowFrom("matrix", allowFrom)
groupReplyAll, _ := opts["group_reply_all"].(bool)
shareSession, _ := opts["share_session_in_channel"].(bool)
autoJoin, _ := opts["auto_join"].(bool)
if !autoJoin {
_, hasKey := opts["auto_join"]
if !hasKey {
autoJoin = true // default true
}
}
autoVerify, _ := opts["auto_verify"].(bool)
if !autoVerify {
_, hasKey := opts["auto_verify"]
if !hasKey {View on GitHub (pinned to 4000b2338a)
Solutions
- Set access_token in the [platforms.matrix] config
- Obtain a token via matrix login or a session export from an existing client
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at platform/matrix/matrix.go:72 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/35f619d9434bd48e.
Report an issue: GitHub.