Google URL Shortener API通过javascript无法正常工作

时间:2014-04-08 10:06:26

标签: javascript api google-url-shortener

我使用代码

var api_key = 'Api-key';

function makeRequest() { 
    var request = gapi.client.urlshortener.url.insert({'resource': {'longUrl': longurl}});
    request.execute(function (response) {
        console.log(JSON.stringify(window.got = response));
    });
}

function load() {
    gapi.client.setApiKey(api_key);
    gapi.client.load('urlshortener', 'v1', makeRequest);
}

并有回复

{"code":404,"message":"Not Found","data":[{"domain":"global","reason":"notFound","message":"Not Found"}],"error":{"code":404,"message":"Not Found","data":[{"domain":"global","reason":"notFound","message":"Not Found"}]}} 

出了什么问题?

1 个答案:

答案 0 :(得分:0)

Google目前正在处理它的JavaScript客户端存在问题。

URGENT - Google Drive SDK JavaScript 404 Error on any method