通过API获取文件信息 [英] Get file information through api
本文介绍了通过API获取文件信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的情况:
https://www.googleapis.com/drive/v1/files/ [文件ID]
但我得到以下错误:
{
错误:{
错误:[
{
domain:usageLimits,
reason:dailyLimitExceededUnreg,
message:
extendedHelp:https://code.google.com/apis/console
}
],
code:403,
消息:每日限制超出,请注册
}
}
我怎样才能把它整理出来?解析方案
您无法通过在浏览器中输入url来检索文件元数据。
相反,您需要使用有效的OAuth 2.0令牌发送授权请求。
更多信息:
https: //developers.google.com/drive/about_auth
I'm not able to get information about a file.
Here it is my situation:
- I'm logged in google drive
- Through google picker I get the file ID
- Then I type the url
https://www.googleapis.com/drive/v1/files/[file ID]
But I get the following error:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit Exceeded. Please sign up",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit Exceeded. Please sign up"
}
}
How can I sort it out?
解决方案
You can't retrieve the file metadata by typing the url in your browser.
Instead you need to send an authorized request with a valid OAuth 2.0 token. For more information:
https://developers.google.com/drive/about_auth
这篇关于通过API获取文件信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文