Skip to content

Instantly share code, notes, and snippets.

@richieforeman
Created July 30, 2012 23:32
Show Gist options
  • Save richieforeman/5bc9bfb03df34ca93cf3 to your computer and use it in GitHub Desktop.
Save richieforeman/5bc9bfb03df34ca93cf3 to your computer and use it in GitHub Desktop.
Google Identity Toolkit test
import httplib2
import json
http = httplib2.Http()
data = json.dumps({"identifier": "gmail.com",
"continueUrl": "http://localhost/cb"})
resp, content = http.request("https://www.googleapis.com/identitytoolkit/v1/relyingparty/createAuthUrl?key=AIzaSyBBPyJTesgJeCeXqTzOG7TxwAj1zkbVWOI",
method="POST",
body=data)
print content
####
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid identifier."
}
],
"code": 400,
"message": "Invalid identifier."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment