经过gapi.auth2.authorize后如何使用Google Docs API?

我授权,然后我需要单击一个按钮来创建文件。

gapi.auth2.authorize({
     client_id: CLIENT_ID,scope: SCOPES,prompt: 'none',response_type: 'id_token permission'
},function(response) {
     var accESS_TOKEN = response.access_token;
     var ID_TOKEN = response.id_token;
});

此功能必须在单击按钮后创建一个文档:

gapi.auth2.docs.documents
.create({ properties: { title: 'New document' }})
.then(function(response) {
     console.log(response);
});

但是我看到错误:“ 无法读取未定义的属性'documents'”。

gapi.auth2.authorize()之后如何使用此API?

morenming 回答:经过gapi.auth2.authorize后如何使用Google Docs API?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3139330.html

大家都在问