This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Help with Tesla Powerwall API V3
#27
When you get new bearer token you need to exchange it for an access token as described here: https://tesla-api.timdorr.com/api-basics...cess-token

Your scheduled refresh script should work like this:
1. get current refresh_token from storage (you will have to store it manually once)
2. request new bearer_token and refresh_token using current refresh_token
3. exchange bearer_token for new access_token
4. save new access_token and new refresh_token to storage

All other API calls should use access_token from storage.
Reply


Messages In This Thread
Help with Tesla Powerwall API V3 - by jamesng - 21.04.2021, 14:18
RE: Help with Tesla Powerwall API V3 - by admin - 27.01.2022, 13:26

Forum Jump: