From 8529e813a91236e44eef99e697cb1db4b9f43475 Mon Sep 17 00:00:00 2001 From: Mateus Date: Mon, 30 Jun 2025 18:24:00 -0300 Subject: [PATCH 1/2] Updating accessToken and serverTime endpoints. --- votify/spotify_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/votify/spotify_api.py b/votify/spotify_api.py index eae0cab..4a5c588 100644 --- a/votify/spotify_api.py +++ b/votify/spotify_api.py @@ -77,12 +77,12 @@ class SpotifyApi: self._set_user_profile() def _set_session_info(self): - server_time_response = self.session.get("https://open.spotify.com/server-time") + server_time_response = self.session.get("https://open.spotify.com/api/server-time") check_response(server_time_response) server_time = 1e3 * server_time_response.json()["serverTime"] totp = self.totp.generate(timestamp=server_time) session_info_response = self.session.get( - "https://open.spotify.com/get_access_token", + "https://open.spotify.com/api/token", params={ "reason": "init", "productType": "web-player", From e9e8cc215efb99fdf73a7994af61babac1d66a4c Mon Sep 17 00:00:00 2001 From: Mateus Date: Mon, 30 Jun 2025 18:27:03 -0300 Subject: [PATCH 2/2] Updating the totp secret. --- votify/totp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/votify/totp.py b/votify/totp.py index 6be6e22..0f0313e 100644 --- a/votify/totp.py +++ b/votify/totp.py @@ -6,8 +6,8 @@ import math class TOTP: def __init__(self) -> None: # dumped directly from the object, after all decryptions - self.secret = b"5507145853487499592248630329347" - self.version = 5 + self.secret = b"449443649084886328893534571041315" + self.version = 8 self.period = 30 self.digits = 6