OAuth, Google and {“error”:”invalid_grant”}

So I was tearing out my hair trying to figure out why I kept getting an “invalid_grant” error while working on a plugin for Sublime Text 2.  Trying to sync ST2 with Google Tasks – no easy task, since the Linux version’s version of Python does not work with HTTPS servers :(

TLDR: If you contact Google for an OAuth2 token too quickly (Read: Before the previous token expires), they will serve you that message.  Just keep it safe somewhere in memory and you should be fine.  If you screwed up, just request another secret and you should be fine.