OpenID and Google Analytics API

26 views
Skip to first unread message

Catalin Fratila

unread,
Sep 29, 2009, 8:23:21 PM9/29/09
to google-analytics-api - GA Data Export API
Hello,

I stumbled over a problem.
A customer asked me if I could do the following:
-install in their site OpenID to sign in their google accounts (they
didn't want to sign in from a form in the internal site, but get
redirected to google and then back to the internal site) and then show
infos from their analytics account. The only problem is that openID
returns also a token for future logins, but this is not compatible
with the google api token needed to fetch their information.

I am quite stuck and don't really know how to resolve the problem.

It would help a lot if you have worked with something like this - sign
in the google account from your server and then get redirected to your
server and post google analytics info.

If I wasn't very clear in my post please feel free to ask more info.

Thanks,

Catalin Ionut Fratila.

Nick

unread,
Sep 29, 2009, 9:07:11 PM9/29/09
to google-analytics-api - GA Data Export API
Hi There,

You can use Open ID with oAuth to get an authenticated token to make
requests to our API: http://code.google.com/apis/accounts/docs/OpenID.html#oauth

You are right, this process requires token management on behalf of the
app provider. The process would be:
- user first logs into your application
- you then redirect the user to Google to get an authentication token
- you store this token in a database and associate it with a user
- you make API requests with this token.

--- user leaves and comes back later ----
- user logs back into your application
- you query the database to retrieve the previous tokens
- you make API requests.

Does this help?
-Nick
Reply all
Reply to author
Forward
0 new messages