I’m playing around with making a bot from scratch for fun and learning. Now, I don’t have a web server or anything like that to handle the authentication of the account I’m using for the bot (and I don’t really do web dev so the prospect of making one for this is not too appealing). Right now the only way seems to be opening a browser and inserting the url myself and copying the token from the redirect url. Wouldn’t have cared too much normally but it seems the tokens expire now, easy to handle while the bot is running but annoying every time I start it back up after a while…
Is there a sensible way for me to handle this or am I just gonna have to suck it up?
To refresh a token, when it expires, you won’t need a web inbound accessable server. And you’ll only need to refresh at boot. Just if the refresh fails you won’t be able to auto fetch a new token. Which is the same for if the token is revoked. You can even set this first token up using
localhost as the redirect (and still not need a web server)
So you’ll only have to paint the bot with an initial access token/refresh token, and then it should look after itself.
You only have to suck it up to paint the bot once.
Aaaah okay I see, I didn’t think I would be able to use the refresh token like that. Makes sense though and I should have known. My bad and thank you!
For clarity the refresh procedure is covered here
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.