Api key and refer restriction

I'd like to use Google Identity Toolkit API to identify the user of a web site.

I made the example program without problems, but when trying to push it on a remote web server it does not work.

I made a new project (so I have new credentials for server, client and apikey).

I made all the modification to the PHP and JSON file but when I try to login I get : There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed

I don't understand where referer are specified because the aipkey is auto generated when you change the API configuration and in API configuration there are not referers or ip indication.

Where am I doing wrong?

Upvotes: 0

Views: 1122

Answers (2)

Under api key there was only one key automatically created by the api configuration. This key had no name and i can't find a way to modify or view it.

I tried to delete it several times, but every time was created without name. I tried to add a new key by myself, but that key wasn't accepted.

I had to delete the auto generated key, create a new one, and then go modifying the api config.

Then it worked....

Upvotes: 1

bojeil
bojeil

Reputation: 30838

Go to google developers console. Select the project you previously created and then go to Credentials option in the APIs & auth menu on the left. Under API keys, select browser key. You can configure the browser key referrer there.

Upvotes: 1

Related Questions