Search code examples
jsonrestgoogle-fusion-tables

Fix "403 Forbidden" Error with Google Fusion Table REST API


Background

I've created a Google Fusion Table, and set it to be public.

enter image description here

I am trying to access the data inside with Google's Rest API.

I'm using an API key rather than OEmbed.

The table ID is 17I-oLcU_9RNosUEtUBMS-k4MlBDCKNvipL00DHBI, so my query ends up as:

https://www.googleapis.com/fusiontables/v2/query?sql=SELECT * FROM 17I-oLcU_9RNosUEtUBMS-k4MlBDCKNvipL00DHBI&key=APIKEY

Problem

I'm getting back a 403 Forbidden error. I've tested my API key with some of the samples on Google's website, and getting back working data. But when I put in my table ID, I get this:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "forbidden",
    "message": "Forbidden"
   }
  ],
  "code": 403,
  "message": "Forbidden"
 }
}

Question:

Is there something else I need to do?


Solution

  • The answer isn't well documented in Google's official documentation, but it turns out that there is another setting buried further down than Sharing Settings.

    Go to:

    File -> About this table

    enter image description here

    That will pop up an overlay. Click on the "Edit table information" link.

    enter image description here

    This will take you to a new page. From there, select the checkbox that says Allow Downloads.

    enter image description here

    Once I changed that, my error instantly disappeared.