Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用融合表API的授权拒绝_Java_Google Fusion Tables - Fatal编程技术网

Java 使用融合表API的授权拒绝

Java 使用融合表API的授权拒绝,java,google-fusion-tables,Java,Google Fusion Tables,我的代码: public class restletexample { String URI = "https://www.googleapis.com/upload/fusiontables/v1/tables/tableid/import"; HashMap<String, String> urlVariables = new HashMap<String, String>(); String column = "'Moth', '30'

我的代码:

public class restletexample {

    String URI = "https://www.googleapis.com/upload/fusiontables/v1/tables/tableid/import";

    HashMap<String, String> urlVariables = new HashMap<String, String>();

    String column = "'Moth', '30', '2012','efef','efefef'";

    public void testrestlet() {

        urlVariables.put("key=", "KEY");

        RestTemplate restTemplate = new RestTemplate();

        restTemplate.postForLocation(URI, column, urlVariables);

    }

    public static void main(String args[]) {

        restletexample rst = new restletexample();
        rst.testrestlet();

    }

}

我已经在API控制台中生成了密钥,并且正在使用相同的密钥。我不知道谷歌为什么不批准我的请求。需要帮助…从过去4个小时以来,我的头都碎了。

你的URI似乎错了-“tableid”应该替换为你表格的实际ID

我不想公开我的tableid,这就是我为什么不写它的原因。
Exception in thread "main" org.springframework.web.client.HttpClientErrorException: 401 Unauthorized