This guide walks you through setting up this repo. To set up the project, follow these steps:
- Clone the repository:
git clone https://github.com/aimun-naharr/google-sheet.git; cd google-sheet
- Install the packages:
npm i
- Run the local server:
npm run dev
Follow these steps to create an OAuth Client ID for accessing the Google Sheets API to create, read, update, and delete data.
- Go to the Google Cloud Console.
- Sign in with your Google account if prompted.
- Click on the "Select a Project" dropdown at the top.
- Select an existing project or click "New Project":
- Enter a project name.
- Select a location (optional).
- Click "Create".
- Navigate to "API & Services" .
- Click "Library".
- Search for "Google Sheets API" in the search bar.
- Select the API and click "Enable".
- Go to the "OAuth consent screen" tab under "APIs & Services".
- Choose "External" and click "Create" (use "External" ).
- Fill in the required details:
- App Name: Enter a name for your app (e.g., My Sheets App).
- User Support Email: Provide a valid email address.
- Developer Contact Information: Enter an email address for communication.
- Click "Save and Continue" (you can skip optional fields for now).
- Skip the Scopes
- In the test user section add your email address;
- Navigate to "Credentials" under the "APIs & Services" section.
- Click "Create Credentials" and select "OAuth Client ID".
- Select "Web application" as the application type.
- Provide a Name for the client (e.g., Sheets API Client).
- Add your Authorized Redirect URIs:
- Enter your app's URL where Google redirects after authentication.
- For development, you can use
http://localhost:5173
(adjust the port if needed).
- Click "Create".
- After creating the OAuth Client ID, a dialog will display your Client ID and Client Secret.
- Copy the Client Id and paste it in the app to login.
- Obtain the client ID from the Google Cloud Console.
- Paste the client ID and log in using your Google account.
- Once logged in, you can use the app to create, read, update, and delete data in your Google Sheets.