The code refresh the token after each 3 hours, using refresh_token and then save the response (which includes token and refresh_token), but after some days (about 1-3), the token fetched by using refresh_token doesn't work anymore and I have to reconnect manually to generate a new token. I had a look on Netatmo forum here https://forum.netatmo.com/viewtopic.php?t=21383&start=20 but I didn't find any working solution.