I am trying to write an application which can upload files to Google Drive. I have chosen to interact with this service via raw http requests as I haven\'t found any useful
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.
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.