I'm Brett Slatkin and this is where I write about programming and related topics. You can contact me here or view my projects.

16 December 2013

OAuth getting in the way of debugging via curl, again. No I can't use the API library because that's what has the bug.

Update: Figured out how to curl Google Cloud Storage from a prod shell:

from google.appengine.api import app_identity
from google.appengine.api import urlfetch

token, expires = app_identity.get_access_token(['https://www.googleapis.com/auth/devstorage.read_only'])

x = urlfetch.fetch('https://storage.googleapis.com/...', headers={'Authorization': 'OAuth ' + token})
print x.content
© 2009-2024 Brett Slatkin