Send validated hardware_id in request_login header (fixes 406 on token refresh)#1269
Merged
fronzbot merged 2 commits intoJul 20, 2026
Merged
Conversation
Blink rejects non-UUID hardware_id headers on /oauth/token with a 406,
so the device_id default ("Blinkpy") breaks in-session token refresh.
Verified against the live API: 406 with "Blinkpy", 200 with a UUID.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fronzbot
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
/oauth/tokenrejects requests whosehardware_idheader is not a valid UUID with406 Not Acceptable.request_login()sendslogin_data["device_id"](default"Blinkpy") as that header, so every in-session token refresh fails. The header now usesauth.hardware_id, which is guaranteed to be a UUID since #1268.As offered in #1268 — measurements there: 406 with
Blinkpy, 200 with a UUID against the live API. The recent reports in #1217 ("Login endpoint failed" ~90 minutes after a restart, restart temporarily fixes it) match this failure mode: startup uses the OAuth v2 refresh path with a proper UUID in the body, while the in-session refresh sends the rejected header.Related issue (if applicable): follow-up to #1268, addresses the refresh failures reported in #1217
Checklist:
toxrun successfully PR cannot be meged unless tests pass🤖 Generated with Claude Code