-
user = request.session.get("discord_user")
if not user:
return {"status": "error", "message": "User not logged in"}
sesh = client.session_from_token(user["token"])
new_token = await sesh.refresh_token(token_url="https://discord.com/api/v10/oauth2/token/") Hello guys im kinda new into this but I'm trying to get a new refresh_token, but when i do so, i get an error I tried searching on google, but did not find anything and there isn't an example for the refresh_token func either. So please help me! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Under the assumption you are using version 0.2.1, there should a method on session |
Beta Was this translation helpful? Give feedback.
Under the assumption you are using version 0.2.1, there should a method on session
.refresh()
that should be the one that works..refresh_token()
is the one we stole from someone's generic implementation on an oauth2 client. Let us know about any further issues!