This section is dedicated to the library for working with API Google Sheets. On this page, all the steps necessary to start working are described
:::important
If you're already using the API to interact with other Google Workspace services and have completed the initial setup, you can skip the steps for **Creating a Project** and **Setting Up OAuth**. You just need to enable the Google Sheets** service in your existing project and reacquire the token (the last two steps in the instructions).
:::
## Getting started
<hr/>
### Project creation
1. Go to the [Google Cloud Console](https://console.cloud.google.com) and create a project
![BF](../../static/img/Docs/GoogleCalendar/1.png)
2. Select the created project and in the side menu go to APIs and Services -> OAuth consent screen
![BF](../../static/img/Docs/GoogleCalendar/2.png)
3. Choose External
![BF](../../static/img/Docs/GoogleCalendar/3.png)
4. Fill in the fields: App name, User support email, and Email addresses (all fields with asterisks)
![BF](../../static/img/Docs/GoogleCalendar/4.png)
5. Click on Next and then Save and continue on the last tab
![BF](../../static/img/Docs/GoogleCalendar/5.png)
6. Click on Publish App
![BF](../../static/img/Docs/GoogleCalendar/6.png)
<hr/>
### OAuth settings
1. In the side menu, select Credentials -> Create Credentials -> OAuth client ID
![BF](../../static/img/Docs/GoogleCalendar/7.png)
2. Enter the name and choose Application type - Desktop app
![BF](../../static/img/Docs/GoogleCalendar/8.png)
3. Save ClientID and Client Secret
![BF](../../static/img/Docs/GoogleCalendar/9.png)
<hr/>
### Enable service - Google Sheets
1. Go to [page Sheets in Marketplace](https://console.cloud.google.com/marketplace/product/google/sheets.googleapis.com)
2. Click Enable
![BF](../../static/img/Docs/GoogleSheets/1.png)
<hr/>
### Token retrieval
1. Pass the ClientID to the function OPI_GoogleWorkspace.FormCodeRetrievalLink() with boolean parameters of the services you use. The function will result in a URL that needs to be opened in the browser. Authorize with your Google account
4. Use the **access_token** to pass as a Token parameter when calling functions of the library, and the **refresh_token** - to obtain a new access_token (function OPI_GoogleWorkspace.RefreshToken(ClientID, ClientSecret, RefreshToken)), when the old one expires. When refreshing the token, the refresh_token is not updated - you can use the same one to get a new access_token each time.