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
Can't create client only with API key #252
Comments
I was surprised that GettingStarted says without exception to use Google's OAuth package and no example shows using WithAPIKey on its own. ...now I know why? Workaround: (personal) fork for one's simple needs? |
Indeed. I don't think that's implemented for the gRPC client. This would be
better posted over on the google-cloud-go repo, by the way.
…On Wed, Mar 14, 2018, 10:37 PM Joshua Olson ***@***.***> wrote:
I was surprised that GettingStarted says without exception to use Google's
OAuth package and no example shows using WithAPIKey on its own.
...now I know why?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#252 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABhlnMsVPYrTVw-qO8fXexILeRoQUk6ks5tef4igaJpZM4SGBe3>
.
|
OTOH, I just found this example code in an issue, so maybe this is possible already? |
I believe the Cloud ML APIs are the only ones that accept API keys.
…On Wed, Mar 14, 2018, 10:40 PM Chris Broadfoot ***@***.***> wrote:
Indeed. I don't think that's implemented for the gRPC client. This would
be better posted over on the google-cloud-go repo, by the way.
On Wed, Mar 14, 2018, 10:37 PM Joshua Olson ***@***.***>
wrote:
> I was surprised that GettingStarted says without exception to use
> Google's OAuth package and no example shows using WithAPIKey on its own.
>
> ...now I know why?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#252 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AABhlnMsVPYrTVw-qO8fXexILeRoQUk6ks5tef4igaJpZM4SGBe3>
> .
>
|
The YouTube Data API v3 doesn't need OAuth for some things. ALSO: The |
That code works for the libraries in this repo (JSON over HTTP), but not
for the gRPC libraries (cloud.google.com/go/...).
I'm sorry about this confusion.
…On Wed, Mar 14, 2018, 10:42 PM Joshua Olson ***@***.***> wrote:
YouTube Data API v3 doesn't need OAuth for some things.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#252 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABhlm2mu_8JMRKmLavBXmj_1UPRiDk7ks5tef9ggaJpZM4SGBe3>
.
|
This question seems resolved. I'm going to close, but anyone feel free to speak up if we should take another look at this. |
https://github.com/google/google-api-go-client/blob/b0284fdf28b5e4d7c9aa5c26e67035437f711304/internal/settings.go#L34
If the apiKey is is set, it still tries to get application default credentials.
This produces errors like this: https://play.golang.org/p/tBtH1v-Sj5w
The same call using curl works (no credentials):
The text was updated successfully, but these errors were encountered: