I want to be able to read in files on a website from a Google Drive account, which has made me pull my hair since the documentation for Google's services is so overwhelming (for me it is anyway, I have little experience with working with SDKs and APIs). I also realize that I need to use OAuth 2 authorization to grant access to the files. Any good ideas on where to start?
Your first step is to decide whether you will be doing the Drive access from a Javascript client, or from a Web Server (php, Java, etc). OAuth is very different depending on which flow you will be using.
Your second step is to decide whether or not you want to use the abstraction libraries, or program directly to the HTTP API.
There are pros and cons to both methods. Personally I elected to use the low level HTTP APIs for the following reasons:-
If you choose to go the HTTP API route, then there are really only three resources that you need.
Make sure you treat OAuth and Drive as separate topics. Understand OAuth first, then tackle Drive.
I'm sure a lot of people have success using the libs, so I won't write them off completely. They're just not for us for the reasons above.
One more tip, remember that OAuth is about Authorisation, not Authentication. So you still need to do your authentication and user/session management. Having said that, OAuth does spit out a user token as a by-product, so there is some overlap. My point is really that you need to roll your own user/session management.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With