{"record":{"id":"35f619d9434bd48e","repo":"chenhg5/cc-connect","slug":"matrix-access-token-is-required","errorCode":null,"errorMessage":"matrix: access_token is required","messagePattern":"matrix: access_token is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/matrix/matrix.go","lineNumber":72,"sourceCode":"\thttpClient           *http.Client\n\tcryptoHelper         any //nolint:unused // *cryptohelper.CryptoHelper when built with goolm tag\n\tcrossSigningPassword string\n}\n\nconst (\n\tinitialBackoff = 2 * time.Second\n\tmaxBackoff     = 60 * time.Second\n\tstableWindow   = 10 * time.Second\n)\n\nfunc New(opts map[string]any) (core.Platform, error) {\n\thomeserver, _ := opts[\"homeserver\"].(string)\n\tif homeserver == \"\" {\n\t\treturn nil, fmt.Errorf(\"matrix: homeserver is required\")\n\t}\n\taccessToken, _ := opts[\"access_token\"].(string)\n\tif accessToken == \"\" {\n\t\treturn nil, fmt.Errorf(\"matrix: access_token is required\")\n\t}\n\tuserID, _ := opts[\"user_id\"].(string)\n\tallowFrom, _ := opts[\"allow_from\"].(string)\n\tcore.CheckAllowFrom(\"matrix\", allowFrom)\n\n\tgroupReplyAll, _ := opts[\"group_reply_all\"].(bool)\n\tshareSession, _ := opts[\"share_session_in_channel\"].(bool)\n\tautoJoin, _ := opts[\"auto_join\"].(bool)\n\tif !autoJoin {\n\t\t_, hasKey := opts[\"auto_join\"]\n\t\tif !hasKey {\n\t\t\tautoJoin = true // default true\n\t\t}\n\t}\n\tautoVerify, _ := opts[\"auto_verify\"].(bool)\n\tif !autoVerify {\n\t\t_, hasKey := opts[\"auto_verify\"]\n\t\tif !hasKey {","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/matrix/matrix.go#L54-L90","documentation":"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.","triggerScenarios":"Thrown at platform/matrix/matrix.go:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set access_token in the [platforms.matrix] config","Obtain a token via matrix login or a session export from an existing client"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}