How to get Google OAuth 2 API and Developer Keys?



Want to use Google Login in your website?! That is pretty simple as Google provides OAuth2 standard authorization. With only little effort and minimal coding you can use Google Authentication integrated to your website.

To use Google information to register or login users using Google PHP API library and MySQL, follow the simple steps below.

Get Authorized API Access

For this you may need to acquire client id, secret key and developer key from Google API console.

* Go to Google API console (you might have to sign-in if not already signed).

*  Click  ”API Access” on the left sidebar, click  “Create an OAuth 2.0 Cliend ID“ button.

google-api-login-key

* A pop-up opens up. Here enter your Project details like name and Product logo (optional), HomePage URL and click next.

create-authentication-key-google

* Choose the application type. Eg. WebApplication for websites.

create-authentication-key-google-1

* Also specify the authorized redirect URI and javascript origin here. And click “Create Client ID” button

* On the next screen you will get Google Client ID and Client Secret.

create-authentication-key

* You can also get the JSON downloaded or edit previous settings here.

ad_468x60[]

Get Google Developer Key

This is pretty simple!

* Click  ”API Access” on the left sidebar, click  “Create New Browser Key“ button and enter the URL here and click ok.

(OR)

* Just go to “Services” from the left sidebar and click on any of the services listed there.

* You should now be asked to accept some Terms and services (2 steps). Just accept them and the service will be turned on.

*  Go to the “API Access” page again and now you will get another key listed below called Simple API Access and this is your developer key!

create-developer-key

* Note that the key you have created if for the browser keys and you can also create Server, browser, iOS and Android keys too!

Topics :