Appendix 15: Google Refresh Token Generation
It is assumed that you have a Google developer console account created on https://console.developers.google.com.
In this Appendix we complete the Google Spreadsheet steps prerequisites.
- Enable APIs for Google Drive and Google Spreadsheet
- Generate Client ID and Client Secret
- Generate Refresh Token in exchange for the Client ID and Client Secret
References
Google Spreadsheet documentation
https://developers.google.com/sheets/api
Enable APIs
In this section we will Enable APIs for Google Drive and Google Spreadsheet.
- Go to the Google Developer Console (https://console.developers.google.com/)
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl1d044d0d43f6e4423857a1ec3d30468a9)
- Click Select a Project or create a New Project. If you have an existing project, you can select it from ALL.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl12e928ccdddc14b6aa7a3c16db785b98a)
- Provide valid values for the project and click on the Create button.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl154537666b05549c7a830533f467e58af)
- Navigate to Dashboard on Google Developer console and Click on ENABLE APIS AND SERVICES.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl1c909033532a6453e92c482484855fe8b)
- Search for Google Drive API and Google Sheets API. Click on Enable.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl1b7f1263651e84f50b95885e6012b5881)
- The following screenshot shows Google Sheets API. Click on Enable.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl1509572c17a6041bcbb3dc093c675be10)
Get a Client ID and Client Secret
- Navigate to the tab OAuth consent screen and choose the valid option.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl1b24480e8317145e08043322e3b797825)
- Enter the Application name, Authorized domains, and click on the Save button.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl191b978ad9d3840cb86ed21166712b5a3)
- Click on Credentials menu >> Create Credentials and from the dropdown list select OAuth client ID.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl11f57d7046a56467a80ba3f0276aef075)
- From the Application type, select the Web Application.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl111448b932564484d9926a018d5eed10b)
- Enter valid Name and Authorized Redirect URIs. Click on the Create button.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl1aad69de0996d443a9a10cd5f4c39c3d2)
- Copy Client ID and Client Secret. Click on the OK button.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl1fa0a07708c0c4955a8aaa8601166c3b7)
- Get Client ID and Client Secret by clicking on the OAuth 2.0 Client IDs.
![](https://support.automationedge.com/DocsDisplay?zgId=60001911841&mode=inline&blockId=m5yl12cf3e0aee79b4fd29fb13b7b104b8ce2)
Generate Refresh Token
In this section we will generate Refresh Tokens using Client ID and Client Secret on Google OAuth 2.0 Playground.
- Go to the Google OAuth Playground (https://developers.google.com/oauthplayground/)
- Click on the Settings icon.
- Click on Use your own OAuth credentials and enter OAuth Client ID and OAuth Client secret generated from the previous step.
- Copy the following URL ‘https://developers.google.com/oauthplayground’