获取错误‘超过每日未验证使用的限制。继续使用需要注册。’在将“https://www.googleapis.com/auth/drive”添加到作用域时。如果我把它从作用域中去掉,它就适用于与其他作用域相关的所有其他函数。我需要在作用域中复制文件。
public handleClientLoad() {
gapi.load('client:auth2', function () {
gapi.client.init({
discoveryDocs: ['https://sheets.googleapis.com/$discovery/rest?version=v4',
'https://www.googleapis.com/discovery/v1/apis/drive/v3/rest'],
clientId: 'MyclientID*.apps.googleusercontent.com',
scope: ` https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/spreadsheets `
}).then(() => {
gapi.client.drive.files.copy({
'fileId': 'My File ID',
'resource': {
'parents': [
'MY Parent File'
],
'name': 'My File Name'
}
})
});
});
}发布于 2017-09-27 01:16:51
提交不带Authorization http头部的API请求时返回该错误。你能追踪网络流量看看是不是这样吗?如果是这样的话,我怀疑您正在做一些事情,比如错误的语法破坏了gapi客户端库,使其无法正常工作。是否有任何控制台消息?
https://stackoverflow.com/questions/46427529
复制相似问题