Reputation: 3105
I am a student and want to experiment with the PaLM API. For this, the first step is to get an API key, as stated here. However, when I click on Get an API key I get an error
How can I get one?
Upvotes: 3
Views: 1069
Reputation: 1003
If you live in an unsupported country (e.g. the UK or Canada), you will need to use a VPN to both get yourself a key and to use it.
If you forget to enable the VPN when using it, you'll get:
{
"error": {
"code": 400,
"message": "User location is not supported for the API use.",
"status": "FAILED_PRECONDITION"
}
}
Anywhere in the US works so if you can VPN to, say, California then you're good.
Upvotes: 1
Reputation: 3105
If anyone else ends up here, in my case it seems to be a location issue. My country is not listed in the list of available regions. After enabling a VPN to the US, I was able to generate a key.
Upvotes: 4