Glad you got it working. To be honest, at least for my use case I'm just authenticating anew each time. My main use of the api is to record the room temperatures every 5 minutes and store that to a database for viewing (http://www.andrew-stock.com/weather/show/). It looks from the response that the token is valid for an hour, but I haven't done anything with that, or seen a use of a the "refresh" token either