修复"403 Forbidden" Google Fusion Table REST API错误 [英] Fix "403 Forbidden" Error with Google Fusion Table REST API

查看:96
本文介绍了修复"403 Forbidden" Google Fusion Table REST API错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个Google Fusion Table,并将其设置为公开.

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

我正在尝试使用Google的Rest API访问内部数据.

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

我使用的是API密钥而不是OEmbed.

I'm using an API key rather than OEmbed.

表ID为17I-oLcU_9RNosUEtUBMS-k4MlBDCKNvipL00DHBI,所以我的查询最终显示为:

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

我回来了403禁止的错误.我已经使用Google网站上的一些示例测试了API密钥,并获取了工作数据.但是当我输入表ID时,我得到了:

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?

推荐答案

答案未在Google的官方文档中详细记录,但事实证明,还有另一个设置比共享设置"更深层地隐藏.

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.

转到:

文件->关于此表

这将弹出一个覆盖图.单击编辑表信息"链接.

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

这将带您进入新页面.在此处,选中允许下载"复选框.

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

更改后,我的错误立即消失.

Once I changed that, my error instantly disappeared.

这篇关于修复"403 Forbidden" Google Fusion Table REST API错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆