Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

googleapis.com: API key not valid. Please pass a valid API key

49 views
Skip to first unread message

alex

unread,
Mar 17, 2022, 11:38:02 AM3/17/22
to
$ curl 'https://www.googleapis.com/youtube/v3/subscriptions?key=$KEY'
{
"error": {
"code": 400,
"message": "API key not valid. Please pass a valid API key.",
"errors": [
{
"message": "API key not valid. Please pass a valid API key.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "API_KEY_INVALID",
"domain": "googleapis.com",
"metadata": {
"service": "youtube.googleapis.com"
}
}
]
}
}

Why?

Eli the Bearded

unread,
Mar 18, 2022, 12:58:33 AM3/18/22
to
In comp.internet.services.video.youtube,
alex <1j94...@lnx159sneakemail.com.invalid> wrote:
> $ curl 'https://www.googleapis.com/youtube/v3/subscriptions?key=$KEY'
...
> Why?

With single 'quotes' variables are not expanded, and '$KEY' is not a
valid API key. Try double "quotes".

Elijah
------
echo is helpful in debugging

alex

unread,
Mar 18, 2022, 2:01:02 PM3/18/22
to
Il 18/03/22 05:58, Eli the Bearded ha scritto:
So would you like to know my secret key?
o_O
0 new messages