Arjun
Arjun

Reputation: 1599

Places API not working. Error: You must enable Billing on the Google Cloud Project

I have an Android app where I display nearby places like gas stations, pharmacies, etc. using Google Map. I am using Maps & Places API.

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=12.2649519,76.6208733&radius=10000&type=hospital&sensor=true&key=MY_API_KEY

I have enabled billing for my account. I have linked the account to my project. The app was working fine. However when I check it now, it gives me error

{ "error_message" : "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started", "html_attributions" : [], "results" : [], "status" : "REQUEST_DENIED"}

My billing account is active. I have not done any changes to the code nor to my billing account. I have not set any application or API restrictions on my API key.

Upvotes: 7

Views: 5887

Answers (1)

Bharat Varma
Bharat Varma

Reputation: 162

I faced the same issue. Apparently there are two kinds of billing accounts. Google cloud and google maps platform. and I think you have used google cloud billing account. Try by linking to google maps platform billing account. I am unable to switch my billing account to google maps platform for this project for some reason so I have created another project and added this google maps platform billing account to this projects. and it works ! yay !

use this link to create google maps platform billing account https://developers.google.com/maps/gmp-get-started

Upvotes: 6

Related Questions