Google Drive API access token and redirect url questions

半腔热情 提交于 2019-12-10 22:42:15

问题


1 - Is possible to run upload/download of files to google Drive API using always the same access token, a sort of shared host for all my site's users, where they can upload and download directly files? if yes how to do that? Just using "static" access token variable in php client creation/authorization?

2 - Why i setted up my web application project on google api console enabling Gdrive api and it still tells me that my redirect url mis-match? i created the app about mmm... 2/3 hours ago. Need to wait more? I checked the url and they both matches on my script and in console api.

3- As i see from the api console, is possible to require more quotas reached the 500K requests per day, how it works? does this require for billing? How much more quotas can i ask and in which cases?

Thanks.


回答1:


1) instead of sharing someone's credentials, you should use Service Accounts. Remember that access tokens expire in one hour, so your approach would still need to take care of refreshing those tokens.

2) there's no delay between the time you configure your credentials in the APIs Console and the time they are live. Please double check that your redirect URL matches exactly the one in the APIs Console, including trailing slashes and http/https.

3) if you need more quota you'll have to fill a form explaining what you need. No billing is required when if additional quota is granted.



来源:https://stackoverflow.com/questions/13010680/google-drive-api-access-token-and-redirect-url-questions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!