Skip to content
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

docs: add sample code for authenticating with api keys #11023

Merged
merged 2 commits into from
Jul 26, 2024
Merged

Conversation

alicejli
Copy link
Contributor

Fixes #10921

This adds the current workaround for manually setting the API Key in the header when instantiating a client.

@alicejli alicejli requested a review from a team as a code owner July 22, 2024 19:40
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jul 22, 2024
@alicejli alicejli requested a review from blakeli0 July 24, 2024 13:41
README.md Outdated Show resolved Hide resolved
We are actively exploring ways to improve the API Key experience.
Currently, to use an API Key with a Java client library, you need to set the header for the relevant service Client manually.

For example, to set the API Key with the [Language service](https://cloud.google.com/java/docs/reference/google-cloud-language/latest/overview):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do Language support API Keys?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it does.

Co-authored-by: Blake Li <[email protected]>
@alicejli alicejli merged commit b12223f into main Jul 26, 2024
31 checks passed
@alicejli alicejli deleted the addAPIKeyDocs branch July 26, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add guides for how to set API Keys
2 participants