How to handle refreshing of access_token #401
Unanswered
zeitmeister
asked this question in
Q&A
Replies: 1 comment 5 replies
-
It's built in. ytmusicapi/ytmusicapi/auth/oauth.py Lines 96 to 98 in 7c9455e |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I have a long running app that talks to ytmusic once a day and i recently switched to the oauth authentication method and after (i think) 18 hours i'm not authenticated anymore. the value in the
expires_in
property of theoauth.json
translates to 18 hours. I see that there is arefresh_token
in the .json file aswell but when i lookup the documentation for the auth flow (https://developers.google.com/youtube/v3/guides/auth/devices) it states that i need theclient_id
andclient_secret
aswell.Does ytmusicapi have a way to refresh the access tokens or must i do it manually? And if that's the case, how do i get the client id and secret (I found them in the
constants.py
file but perhaps there's a better way that i'm not aware of yet)?Thanks!
Simon
Beta Was this translation helpful? Give feedback.
All reactions