API invalid grant at random intervals

david

Twice today, around 10:00 UTC/12:00 European time and again just now, around 16:00 UTC/18:00 European time, our automated weather downloader got a 401/Bad Request ("invalid grant:") from the Netatmo API. This required us to go into the Netatmo app definition (https://dev.netatmo.com/apps/...) and generate a new token.

Fortunately we store these in a secret provider separate from our app code, but because we're based in Chicago, the 10:00 UTC outage wasn't discovered for 3 hours.

Is there an issue with the API today?

1

Comments

62 comments

  • Comment author
    silvan
    • Edited

    I had similar issues, and I noticed that logging in on a second instance of the app with the same Netatmo credentials will invalidate the token of the first instance. Is this the expected behavior?

    So, if you have two instances of the same app running at the same time, you would need two Netatmo accounts to log in. 

    1
  • Comment author
    Terje Nesthus

    I had this problem myself, after reading this thread I found my problem, as the Community moderator stated: 

    If the refresh token process is broken for any reason (i.e : the refresh_token value wasn't stored and so is unknown) you have to redo the /authorize process 

    My problem was that i only updated access_token and forgot to update refresh_token when i got the new tokens. After fixing this, no more invalid_grant. 

    0

Please sign in to leave a comment.