pavan cd
pavan cd

Reputation: 53

{ "error_message": "You must enable Billing on the Google Cloud Project }

Trying to get Direction route between two points in map

This is the url i am using to get directions

(https://maps.googleapis.com/maps/api/directions/json?origin=16.3064857,80.4418659&destination=27.2038,77.5011&mode=driving&key=MyApiKey)

Also I have enabled my billing account in google cloud console but still getting output as

{

  "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",

  "routes": [],

  "status": "REQUEST_DENIED"


}

Upvotes: 5

Views: 31578

Answers (2)

kotlin_noob
kotlin_noob

Reputation: 3

I was trying to use Google Maps related API for which I got this response on postman and similar error message inside my App.

  "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",

  "routes": [],

  "status": "REQUEST_DENIED"

After spending hours, this worked for me:-

  1. You need to create a billing account (For Google Maps Platform). For India: faq maps platform

See example for billing account

2.) You should have billing enabled for your project through account linked with Google Maps platform (linking with cloud platform won't work) Assuming you have billing enabled by now then to link project go here: projects

Then across your project click 3 dots (in case if it has already billing enabled with account linked with Cloud Platform then disable it) and select the account which has billing enabled for Maps Platform.

Hope this helps!

Upvotes: 0

Philippe
Philippe

Reputation: 74

You first need to verify that the project is linked to the billing account in question. You can check by going into "Google Cloud Console Manage billing accounts page", selecting your billing account and clicking on "Projects linked to this billing account". [1] Then you need to verify if the billing account is linked to the project in question by going into the “My projects” tab and from there, you will see all the projects with their associated billing account. [2] Any project with no billing account associated with it will display “Billing is disabled” as a message. To enable billing, go to the “My Projects” tab and click on the menu of the desired project from the list, select “Change billing”, then choose the desired destination billing account. If you’ve verified the steps above, then please check that the account holds the required permissions [3]

[1] https://cloud.google.com/billing/docs/how-to/view-linked#view_the_projects_linked_to_a_billing_account

[2] https://cloud.google.com/billing/docs/how-to/view-linked#view_the_billing_account_linked_to_each_of_your_projects

[3] https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_an_existing_project

Upvotes: 1

Related Questions