AlexxIT/go2rtc · error
wyze: no access token in response
Error message
wyze: no access token in response
What it means
pkg/wyze cloud Login performs the Wyze OAuth-style login and expects the response to contain an access token. When the API responds successfully (no MFA required, HTTP OK) but result.AccessToken is empty, the client treats the response as useless and returns this error before storing the token.
Solutions
- Verify Wyze account credentials and that the account is not locked or requiring re-verification in the Wyze app
- Log/inspect the full login response to see what the cloud actually returned
- Confirm you are using a current version of the library matching the live Wyze API
- Try login with MFA handling enabled (LoginWithCaptcha) in case MFA detection failed
Defensive patterns
Strategy: try-catch
Try / catch
if err := cloud.Login(user, pass); err != nil {
if strings.Contains(err.Error(), "no access token") {
// surface account-verification guidance or retry with MFA flow
}
return err
} Prevention
- Keep the wyze client library updated against API changes
- Verify account status in the Wyze app before programmatic login
- Enable MFA-aware login flows (captcha/MFA)
When it happens
Trigger: Calling wyze Login (or LoginWithCaptcha) with credentials the Wyze cloud accepts but which do not yield a token — typically when the API returned an unexpected/undocumented success payload, e.g. an account requiring further verification the client didn't detect.
Common situations: Wyze changing their login API response shape; accounts flagged and returning empty tokens; wrong API base URL or region; a proxy/interception stripping the token field.
Understand the failure class
Background: "invalid response format", "malformed payload", "missing data field": when an API returns 200 but the response shape is wrong — this error's family across 23 libraries.
Related errors
AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07).
Data as JSON: /api/errors/76b285e864c75dbf.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/wyze/cloud.go:145
if errResp.hasError() {
return fmt.Errorf("wyze: login failed (code %s): %s", errResp.code(), errResp.message())
}
var result loginResponse
if err := json.Unmarshal(body, &result); err != nil {
return fmt.Errorf("wyze: failed to parse login response: %w", err)
}
if len(result.MFAOptions) > 0 {
return &AuthError{
Message: "MFA required",
NeedsMFA: true,
MFAType: strings.Join(result.MFAOptions, ","),
}
}
if result.AccessToken == "" {
return errors.New("wyze: no access token in response")
}
c.accessToken = result.AccessToken
return nil
}
func (c *Cloud) GetCameraList() ([]*Camera, error) {
payload := map[string]any{
"access_token": c.accessToken,
"phone_id": c.phoneID,
"app_name": appName,
"app_ver": appName + "___" + appVersion,
"app_version": appVersion,
"phone_system_type": 1,
"sc": "9f275790cab94a72bd206c8876429f3c",
"sv": "9d74946e652647e9b6c9d59326aef104",
"ts": time.Now().UnixMilli(),View on GitHub (pinned to c245815e75)