notmarek / BeFake

BeReal Python API wrapper
131 stars 29 forks source link

bereal token expiring after a day #94

Closed omtoi101 closed 1 year ago

omtoi101 commented 1 year ago

File "/usr/local/lib/python3.9/dist-packages/BeFake/__main__.py", line 28, in wrapper raise Exception("No token found, are you logged in?") Exception: No token found, are you logged in? I run a bot 24/7 on a vps i check back on it and after about a day it starts throwing this exception and i need to re log in with my phone num. can provide more info if needed

SHADOW-13-WALKER commented 1 year ago

BeReal introduced a change to the API so now you need to maintain a stable login in connection, the token expires after 2~3 hours, add the command "refresh" to your code between now and then, it prevents you from getting logged out, like every 30 min !

Smart123s commented 1 year ago

Duplicate of #89

BeReal introduced a change to the API so now you need to maintain a stable login in connection, the token expires after 2~3 hours, add the command "refresh" to your code between now and then, it prevents you from getting logged out, like every 30 min !

There's no need to run an extra command, the token is refreshed automatically each time BeFake starts up (if the token has expired). The problem relies in the refresh process itself.