Reputation: 33
I'm building a webapp in python, using Oauth 2.0 with multiscope token. Accessing and processing document list feeds works fine.
But when I try to download the content of files those were not converted to a Google Documents format I always get HTTP 401 error as response. It doesn't change anything if I append the token at the end of the request url or not. I send GET to the address that I found in the src attribute of the entry's content tag. Any idea what am I doing wrong?
Or what is the point of docs.googleusercontent.com token scope if it is not possible to get access with token?
Upvotes: 1
Views: 116
Reputation: 15024
Update your code to use the new Google Drive API if you can. To download a file from Drive, you have to send an authorized GET request to the file's downloadUrl, as explained in the reference guide:
https://developers.google.com/drive/v2/reference/files/get
The Google Drive SDK also has extensive documentation about the authorization process (https://developers.google.com/drive/about-auth) and a complete Python sample running on App Engine:
https://developers.google.com/drive/examples/python
Upvotes: 1