Posts Tagged ‘stackoverflow’

Programmatically accessing authenticated Google App Engine services

Friday, September 19th, 2008

This one has been bugging me for a few days, and with help from a very helpful Google engineer I’ve finally got this working, so I thought I’d share my code where the next poor soul to try and do it might find it!

The problem:
I’ve written a small web service which I am hosting on Google App Engine.

By adding “login: required” to specific services in the app’s app.yaml file, I can make sure that you need to login to access a service.

If you’re accessing the service from a web browser, this is fine – you get redirected to a Google login page, and after entering your username and password and hitting ‘submit’, you get sent on to the web service you wanted.

But how do you do that programmatically? I wanted to do it from a Python application on my desktop, without being able to navigate the HTML login form.

(more…)