The authorization URL and the token URL required to configure OAuth2 authentication were somewhat difficult to find in Google’s docs (found here Usando OAuth 2.0 para aplicativos de servidor Web | Google Identity Platform | Google Developers ), so I thought I would post a template for authenticating Coda packs with Google APIs.
Here is the relevant code without any comments:
Thanks for sharing! I think you’ll also want to add the following to your auth config:
These parameters ensure that you get a refresh token in your Google OAuth2 response, allowing the Pack to automatically refresh it’s access token.
Thanks! Added it to the gist.
Does Google require these prerequisites before using the API with Coda?
To successfully create your first client application, you must complete the following prerequisites:
Get a Google Account.
Try out Business Profile.
Create a project in the Google API Console.
Request access to the API.
Every Google API is different, but if that’s what the docs says then yes, those will be requirements.