Simple recipe for adding per-user authentication for Google APIs to a Coda pack

The authorization URL and the token URL required to configure OAuth2 authentication were somewhat difficult to find in Google’s docs (found here 將 OAuth 2.0 用於 Web 服務器應用程序  |  Google Identity  |  Google Developers ), so I thought I would post a template for authenticating Coda packs with Google APIs.


Thanks for sharing! I think you’ll also want to add the following to your auth config:

  additionalParams: {
    access_type: "offline",
    prompt: "consent",

These parameters ensure that you get a refresh token in your Google OAuth2 response, allowing the Pack to automatically refresh it’s access token.

1 Like

Thanks! Added it to the gist.