Created
July 6, 2010 15:27
-
-
Save swinton/465526 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
""" | |
Generate an auth_token for access to a hosted Google Docs account using the Google Docs API | |
See: http://code.google.com/apis/documents/overview.html | |
""" | |
import gdata.docs.client | |
client = gdata.docs.client.DocsClient(source='yourCo-yourAppName-v1') | |
client.ssl = True # Force all API requests through HTTPS | |
client.http_client.debug = False # Set to True for debugging HTTP requests | |
client.ClientLogin('your-email-address@example.com', 'pa$$w0rd', account_type='HOSTED', source=client.source) | |
print client.auth_token.token_string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment