background preloader

GReaderAPI

Facebook Twitter

OAuth 2.0 - Google APIs Client Library for Python. This document describes OAuth 2.0, when to use it, how to acquire client IDs, and how to use it with the Google APIs Client Library for Python. OAuth 2.0 explained OAuth 2.0 is the authorization protocol used by Google APIs. It is summarized on the Authentication page of this library's documentation, and there are other good references as well: The protocol is solving a complex problem, so it can be difficult to understand. Acquiring client IDs and secrets You can get client IDs and secrets on the API Access pane of the Google APIs Console. Web application client IDs Installed application client IDs Service Account client IDs Warning: Keep your client secret private. The oauth2client library The oauth2client library is included with the Google APIs Client Library for Python. Flows The purpose of a Flow class is to acquire credentials that authorize your application access to user data.

Note: See the Using Google App Engine and Using Django pages for platform-specific Flows. OAuth2WebServerFlow. Andy's Blog: How to Build an OAuth Consumer. I just read a magnificent blog post from Joseph Smarr over at Plaxo that inspired me to share some of my experiences in helping to build and test TripIt's OAuth protected API. I've written this post as a guide that lets you manually walk through all of the steps an OAuth consumer must implement in order to be able to make authenticated calls to TripIt's API. At each step of the process I've referenced a set of command line utilities that you can use to run through the examples as well as explanations for what those utilities are doing under the covers.

All of these utilities can be found in TripIt's Python binding/wrapper library here: The Python binding for the TripIt API is actually a complete OAuth consumer implementation in addition to a convenient wrapper for the TripIt API. Also, please note that the discussion is very TripIt focused. Alice: I would like to develop a TripIt application.

Oauth_nonce. Using OAuth 2.0 for Devices - Google Accounts Authentication and Authorization. This document is for you if: You are writing an installed app for a platform other than Android or iOS, and Your app will run on devices that do not have access to a system browser, or devices with limited input capabilities; for example if your app will run on game consoles, video cameras, or printers. If you are writing an app for Android or iOS, use Google+ Sign-In to authenticate your users. The Google+ Sign-In button manages the OAuth 2.0 flow both for authentication and for obtaining authorization to Google APIs. Google+ Sign-In works for all users with a Google account, whether or not they have upgraded to Google+. If you are writing an installed app that is not for Android or iOS, and if the app will run on devices that have a system browser and rich input capabilities such as a full keyboard, then see Using OAuth 2.0 for Installed Applications.

Contents Overview Your application begins this flow with a request to a Google URL with a set of parameters. Obtaining a user code Examples. OAuth 2.0 Playground. Googlereader/GoogleReader/reader.py at master · brutuscat/googlereader. Harryrose/Python-Google-Reader-Notifications. PyGoogleReaderClient/googlereader.py at master · yishh/pyGoogleReaderClient. Python script for starring and liking google reader items from exported json (used to migrate starred and liked items), check for web app version. #! Python2 # Gaute Hope <eg@gaute.vetsj.com> 2011 # Note: This script was only made to serve its purpose one time, and is not # necessarily very user friendly.

But have been used with success migrating # Google Reader data to a Google Apps account. # Stars and likes items in Google Reader, used to migrate starred # and liked items from old account to new. . # transferred using OPML, json acquired using the export functionality # on original account. # First: Create a secret API key for this application. . # provided as a service, but run stand alone, you are the provider # and need a secret key!

# See: # This does work on Google Apps, but enable the Webmaster Tools # Service and add service (domain) and generate key through there. # Store key in file oauth_key and secret in file oauth_secret (or edit # script below). # Place files: # - starred-items.json # - liked-items.json # in same folder as script and run with python2. . # to this program for your account. Print. Askedrelic/libgreader. Getting list of tags for a user from google reader api. Conky Google Reader Python Script. Http - What is the cURL command-line syntax to do a POST request. cURL - Tutorial. cURL Docs Tutorial HTTP Scripting 1.1 Background1.2 The HTTP Protocol1.3 See the Protocol1.4 See the Timing1.5 See the Response 2.1 Spec2.2 Host2.3 Port number2.4 User name and password2.5 Path part Fetch a page HTML forms 4.1 Forms explained4.2 GET4.3 POST4.4 File Upload POST4.5 Hidden Fields4.6 Figure Out What A POST Looks Like HTTP upload HTTP Authentication 6.1 Basic Authentication6.2 Other Authentication6.3 Proxy Authentication6.4 Hiding credentials More HTTP Headers 7.1 Referer7.2 User Agent Redirects 8.1 Location header8.2 Other redirects Cookies 9.1 Cookie Basics9.2 Cookie options 10.1 HTTPS is HTTP secure10.2 Certificates Custom Request Elements 11.1 Modify method and headers11.2 More on changed methods Web Login 12.1 Some login tricks Debug 13.1 Some debug tricks References 14.1 Standards14.2 Sites 1. 1.1 Background This document assumes that you're familiar with HTML and general networking.

Curl is not written to do everything for you. 1.2 The HTTP Protocol The client, curl, sends a HTTP request. Or 3. Command Line Tutorials - Curl. Hey everybody! Welcome back to my ongoing command line series. Check out the older posts here. This week we're going to cover one command in depth, since it's a pretty important one. We're going to learn about curl, and if time permits - curling! Curl is "a command line tool for getting or sending files using URL syntax. " man curl As we've previously learned, most commands that come with your system have what's called a "man" page, short for manual; by typing in that command, you've opened the system's help page for the curl command. So to see it in action, type: curl Oops! Curl | tidy -i This passes curl's output into a command we haven't seen before: tidy. tidy will nicely format any code we pass to it, and it's configurable to boot (check out the man page!).

Curl | pbcopy Here, we're feeding the response retrieved by curl into another new command, pbcopy. Curl >> ~/google.txt That's all for today! Google-reader-api/source at master · arowser/google-reader-api.