Easy way to download a file using Google Drive API

While I was working with Google Drive API, I found a really useful trick. Instead of having to add this annoying header to your GET request Authorization: Bearer [yourtoken], the easiest way is just to add your access token directly in your url as a parameter.

For instance if your URL is https://docs.google.com/feeds/download/[yourfilekey] just add ?access_token=[yourtoken] at the end and then use this URL directly in your GET request. It should download the file directly.

N.B.: It should work with all the queries to Google Drive API.

Article inspired by this stackoverflow answer, EDIT #2.