Android - Google Drive HTTP Request

谁说胖子不能爱 提交于 2019-11-30 21:12:48

Are you sure your token is valid for Drive Scopes ? The test you mention at the end of your question is not on the same scope.

Also, don't forget that Oauht2 token are valid only for one hour. You may need to request another one or to use your refresh token, if you have one.

If you use HTTPS, GET instead of POST and a Bearer token it works.

using curl:

curl -H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
https://www.googleapis.com/drive/v2/files

I have no idea why google is not documenting the REST API. Please comment if you found the documentation somewhere.

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