Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Places API Key seems to expire immediately after one use

I recently generated a new Server API key using the Google API Console, for use with the Places API. I'm interested in using the Details API Call, and it worked as expected during my first request. Every subsequent request, however, has yielded this error:

{
   "error_message" : "The provided API key is expired.",
   "html_attributions" : [],
   "status" : "REQUEST_DENIED"
}

The key is definitely not expired, since it was issued only minutes before and had worked just fine a few seconds ago. I've tried issuing new keys, but the result is always the same: works once, then never again. Any ideas? Thanks in advance.

like image 822
A.C. Byrne Avatar asked Jun 01 '14 02:06

A.C. Byrne


People also ask

How long does Google API key last?

You can regenerate API keys from the Credentials page by clicking Regenerate key for each key. Then, update your applications to use the newly-generated keys. Your old keys will continue to work for 24 hours after you generate replacement keys.

How do I fix expired API key?

Your API key is outdated. Go to Google API console, create a new public API key there and paste it to the "API Key For Your Firebase Dynamic Links Account" field on the plugin's settings page. 2. Your API key is newly created.

Why is my Google API key not working?

There are a several reasons why your google maps may not be working, the most common issue being no Google Map API key set or set incorrectly. To use the Google Maps JavaScript API, you must register your app project on the Google Cloud Platform Console and get a Google API key which you can add to your app.

Can I use Places API without billing?

Reminder: To use the Places API, you must enable billing on each of your projects and include an API key with all API or SDK requests. The Places API uses a pay-as-you-go pricing model. Places API requests generate calls to any of multiple SKUs.


1 Answers

Figure out problem in android Do this in google developer console:

  1. Create key for browser applications not for android application

  2. Enable: Google Places API Web Service

  3. Wait for approx 10 min till it approves

  4. Sha key should be same

    Note: Please check sha key as well they must be same on developer console as well as android app.

like image 163
Rajesh Tiwari Avatar answered Oct 12 '22 16:10

Rajesh Tiwari