Skip to content

Commit

Permalink
Merge pull request #925 from fronzbot/fix-verify-endpoint
Browse files Browse the repository at this point in the history
Fix verify endpoint
  • Loading branch information
fronzbot authored Apr 25, 2024
2 parents a975815 + 980b943 commit 7add82f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions blinkpy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ async def request_login(
async def request_verify(auth, blink, verify_key):
"""Send verification key to blink servers."""
url = (
f"{blink.urls.base_url}/api/v4/account/{blink.account_id}"
f"/client/{blink.client_id}/pin/verify"
f"{blink.urls.base_url}/api/v5/accounts/{blink.account_id}"
f"/users/{blink.auth.user_id}"
f"/clients/{blink.client_id}/client_verification/pin/verify"
)
data = dumps({"pin": verify_key})
return await auth.query(
Expand Down
2 changes: 2 additions & 0 deletions blinkpy/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def __init__(
self.region_id = login_data.get("region_id", None)
self.client_id = login_data.get("client_id", None)
self.account_id = login_data.get("account_id", None)
self.user_id = login_data.get("user_id", None)
self.login_response = None
self.is_errored = False
self.no_prompt = no_prompt
Expand All @@ -64,6 +65,7 @@ def login_attributes(self):
self.data["region_id"] = self.region_id
self.data["client_id"] = self.client_id
self.data["account_id"] = self.account_id
self.data["user_id"] = self.user_id
return self.data

@property
Expand Down

0 comments on commit 7add82f

Please sign in to comment.