-
Notifications
You must be signed in to change notification settings - Fork 39
secret description fixed #1510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
secret description fixed #1510
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Getting API Keys for OAuth Authentication | ||
|
|
||
| Follow these steps to create and configure your OAuth credentials for using Google APIs. | ||
|
|
||
| ## 1. Create API Credentials | ||
|
|
||
| 1. Go to the [Google API Console](https://console.developers.google.com/). | ||
| 2. From the projects list, select an existing project or create a new one. | ||
| 3. In the left side menu, select **APIs & Services**. | ||
| 4. On the left menu, click **Credentials**. | ||
| 5. Click **Create Credentials** and select **OAuth client ID**. | ||
| 6. In the **Application type** section, select **Desktop app**. | ||
| 7. Provide an appropriate name for your client ID (e.g., "Gspread OAuth Client"). | ||
| 8. Click **Create**. | ||
|
|
||
| Once the credential is created, you will receive a **Client ID** and **Client Secret**. These are required for accessing the API. | ||
|
|
||
| ## 2. Store Your Credentials | ||
|
|
||
| Save the **Client ID** and **Client Secret** in a `.env` within a `.secret` directory. The file should look like this: | ||
|
|
||
| ```bash | ||
| CLIENT_ID=YOUR_CLIENT_ID | ||
| CLIENT_SECRET=YOUR_SECRET_KEY | ||
| ``` | ||
|
|
||
| ## 3. Why do we need it? | ||
|
|
||
| After executing each command, you need to grant the GSPREAD program access to the Google API. You will receive a link that begin with 'Please direct your browser to https://....' that will redirect you to your browser, where you must authorize the access. You will need to select the appropriate Google account that has the credentials for the application. The **CLIENT_ID** and **CLIENT_SECRET** are set up to do this process. | ||
|
|
||
| ## 4. Troubleshooting | ||
|
|
||
| If you encounter a page displaying an error instead of the Google account selection screen, it is likely that you need to add **AUTH_URI** or **TOKEN_URI** to the .env file. In this case, all four secrets are required. To retrieve them, download the API key you created in JSON format. Open the file and copy the necessary keys into the .env file. After making these changes, your .env file should look like this: | ||
|
|
||
| ```bash | ||
| CLIENT_ID=YOUR_CLIENT_ID | ||
| CLIENT_SECRET=YOUR_SECRET_KEY | ||
| AUTH_URI=YOUR_AUTH_URI | ||
| TOKEN_URI=YOUR_TOKEN_URI | ||
| ``` | ||
|
|
||
| If you still get some issues, follow [Google OAuth Documentation](https://developers.google.com/identity/protocols/oauth2/). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.