我想使用java从我的android应用程序数据库向google fusion表中插入数据

我想使用java从我的android应用程序数据库向google fusion表中插入数据,java,android,google-fusion-tables,Java,Android,Google Fusion Tables,我正在android上制作一个应用程序,通过表单收集数据,并将其保存在内部内存中的SQLite数据库中。然后我从数据库中获取所有数据,我想将所有数据插入到我创建的Google Fusion表中。我在google控制台中创建了一个项目,并启用了fusion table api。我还为我的应用程序生成了OAuth客户端id和api密钥 现在我尝试通过HttpPost发送insert查询。但是我得到了403错误代码 { "error": { "errors": [ { "domai

我正在android上制作一个应用程序,通过表单收集数据,并将其保存在内部内存中的SQLite数据库中。然后我从数据库中获取所有数据,我想将所有数据插入到我创建的Google Fusion表中。我在google控制台中创建了一个项目,并启用了fusion table api。我还为我的应用程序生成了OAuth客户端id和api密钥

现在我尝试通过HttpPost发送insert查询。但是我得到了403错误代码

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "ipRefererBlocked",
    "message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.",
    "extendedHelp": "https://console.developers.google.com"
   }
  ],
  "code": 403,
  "message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed."
 }
}
这是代码snipet

public void insertService(String query) {
    String url = URL + "?sql=" + query + "&key=AIzaSyDD7eZrdhxl7QjTJHgu4thZ-OJZgTOIDXQ";
    HttpClient client = new DefaultHttpClient();
    HttpPost httpPost = new HttpPost(url);
    try {
        HttpResponse response = client.execute(httpPost);
        // ....
没有足够的教程或文档可用于Fusion表。我已经浏览了谷歌文档,但仍然没有找到任何解决方案。 我是否应该使用OAuth,如果是的话,如何在java中使用它,因为文档中不清楚。如果有人知道,请一步一步地向我解释。 请帮助我,我需要尽快完成这项工作


提前感谢。

您的api密钥有权访问fusion表吗。当我没有正确配置api时,我出现了这个错误。