{"record":{"id":"7564e16f7c9adef9","repo":"AlexxIT/go2rtc","slug":"wyze-api-key-and-api-id-required-for-account-s","errorCode":null,"errorMessage":"wyze: api_key and api_id required for account: %s","messagePattern":"wyze: api_key and api_id required for account: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/wyze/wyze.go","lineNumber":49,"sourceCode":"\n\tlog := app.GetLogger(\"wyze\")\n\n\tstreams.HandleFunc(\"wyze\", func(rawURL string) (core.Producer, error) {\n\t\tlog.Debug().Msgf(\"wyze: dial %s\", rawURL)\n\t\treturn wyze.NewProducer(rawURL)\n\t})\n\n\tapi.HandleFunc(\"api/wyze\", apiWyze)\n}\n\nfunc getCloud(email string) (*wyze.Cloud, error) {\n\tcfg, ok := accounts[email]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"wyze: account not found: %s\", email)\n\t}\n\n\tif cfg.APIKey == \"\" || cfg.APIID == \"\" {\n\t\treturn nil, fmt.Errorf(\"wyze: api_key and api_id required for account: %s\", email)\n\t}\n\n\tcloud := wyze.NewCloud(cfg.APIKey, cfg.APIID)\n\n\tif err := cloud.Login(email, cfg.Password); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn cloud, nil\n}\n\nfunc apiWyze(w http.ResponseWriter, r *http.Request) {\n\tswitch r.Method {\n\tcase \"GET\":\n\t\tapiDeviceList(w, r)\n\tcase \"POST\":\n\t\tapiAuth(w, r)\n\t}","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/internal/wyze/wyze.go#L31-L67","documentation":"getCloud found a matching account entry, but its APIKey or APIID fields are empty. The Wyze cloud API cannot be authenticated without both credentials, so the function refuses to build a Cloud client; the fix is supplying api_key and api_id in the account config.","triggerScenarios":"Thrown at internal/wyze/wyze.go:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fill in both api_key and api_id in the wyze config for this account","Obtain the key/id from the Wyze app keyring service and re-authenticate"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}