I am trying to run the quick start code of Real Time API of Google Drive. I believe I did everything right. But I am getting
Error: origin_mismatch
Request Details
openid_connect_request=true
cookie_policy_enforce=false
scope=https://www.googleapis.com/auth/drive.install https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/plus.me
response_type=token
access_type=online
redirect_uri=postmessage
proxy=oauth2relay601571239
origin=http://127.0.0.1
state=811328575|0.818765953
display=page
client_id=XXXXXXXXXX
You haven't given much detail about your application architecture, so i can only suggest a general answer. OAuth restricts which URLs can be referred to it. The list of permitted URLs is configured in the API console at https://code.google.com/apis/console. The URL is very fussy, so make sure you enter it exactly as it appears in the address bar.
As at Oct 2013, you can't use localhost. You have 2 choices.
However, I believe that it is now possible to configure localhost in the Google api console.