Moe
Moe

Reputation: 95

Getting started with Google API and oAuth

I'm working on a project that requires the user to log in - but I want to use their Google Account as their Login identity.

I'm using this example: http://www.ioncannon.net/programming/1443/google-oauth-for-installed-apps-php-example/

To get me started, and I've managed to request an Authorize Token and use that to get an access token.

However, when I reach the very last stage of oAuth (Described as "Stage 5" in the Tutorial) I receive this error from the CURL execution:

Invalid request URIInvalid request URI

I am using the feed: https://www.google.com/m8/feeds/

What I am trying to achieve here: I simply want the user to log-in with their Google Account, and use their firstname/lastname/avatar from their Google Account on the website. Similar to using Twitter/Facebook to make contribution on a website (like commenting) without having to sign up as a member for just that website.

Upvotes: 2

Views: 866

Answers (1)

Abhinav Manchanda
Abhinav Manchanda

Reputation: 6641

Add this to the scope - https://www.googleapis.com/auth/userinfo.profile

and request information from here - https://www.googleapis.com/oauth2/v1/userinfo?alt=json

Upvotes: 1

Related Questions