June 2017
Intermediate to advanced
400 pages
10h 32m
English
This recipe takes care of storing and retrieving the contents of the token to/from a file. If it's a first run, it must execute the entire code exchange, but the subsequent runs will reuse the access token, and if one is available, it will refresh using the refresh token.
There is currently no way in this code to differentiate between users/tokens, but that could be accomplished with cookies as a key for a filename or a row in the database as well. Let's walk through what this code does:
Read now
Unlock full access