-
Notifications
You must be signed in to change notification settings - Fork 36
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
secret description fixed #1510
Merged
Merged
secret description fixed #1510
Changes from 2 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 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,41 @@ | ||
# 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 | ||
``` | ||
|
||
In most cases, only these two secrets are required. | ||
|
||
|
||
# Troubleshooting | ||
|
||
If you encounter problems with authentication or tokens, you will most likely need to add **AUTH_URI** or **TOKEN_URI** to the .env file. In such case all 4 secrets are requeired. To retrieve them, download the API key you created in JSON format. Open the file and copy the keys into the .env file. After making these changes, your .env file should look like this: | ||
|
||
```bash | ||
sevabakutov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?