Dinesh Jadhav
Dinesh Jadhav

Reputation: 1

Flutter : Exception caught by image resource service

HTTP request failed, status Code: 403, when I try to call Map Api in flutter Here is the screenshot Anyone please help me out

Upvotes: 0

Views: 502

Answers (2)

GrahamD
GrahamD

Reputation: 3165

The url shown in your screenshot returns the following message along with the 403 code:

The Google Maps Platform server rejected your request. 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

You therefore have to do three things, in you code and on the Google cloud console:

  1. Ensure that you trap and report any error message returned from the api in order to better understand the response code.
  2. Cancel the api key that you have now published to the world and generate a new one for the Google maps api, in cloud console.
  3. Enable billing on your project otherwise Google maps api will never work as it is a chargeable service.

Hope this helps. As I said, NEVER publish api keys nor store them on GitHub or similar.

Upvotes: 1

Avinash
Avinash

Reputation: 597

Sorry to say but error 403 means you don't have any access to that image from the server side.

Upvotes: 0

Related Questions