I'm Brett Slatkin and this is where I write about programming and related topics. Check out my favorite posts if you're new to this site. You can also 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-2019 Brett Slatkin