Client ID and Client Secret in Google Developers Console

How To Get Google Client ID And Client Secret From Google Developers Console

Here is a video guide specially made for Analytify WordPress Plugin users.

Following are the simple steps that can help you get your Google Client ID and Client Secret for your Web Apps or WordPress plugins from the Google Developers Console. We wrote this tutorial for Analytify users but It can be beneficial to everyone.

Steps to get Google Client ID and Client Secret

Step 1

You need to create a Project in Google Developer Console. Click here to go to the Google Search Console web page. You will be asked to log in with your Google Account, if you are not logged in already.

If you don’t have any projects already create in Google Developers Console, you will see the following screen.
Click on the “Create Project” button.

If you already have projects in your Google Developer Console, click on the project name in the top-left corner next to the Google Cloud Platform logo, a new pop-up window will open. Click on the “New Project” button to create a new project.

Step 2

In either case, you will be redirected to the “New Project” page, where you will be asked to enter your “Project Name”, which will help you recognize your project in the console.
Add an appropriate name and click on the “Create” button.

Wait a couple of seconds while your project get created. You will see a notification when your project is ready.

Click on the “Select Project” link to enter the dashboard for the project you just created.

Step 3

Now, you need to add two libraries to your project.

  • “Google Analytics API” for analytics configuration.
  • “Google Analytics Reporting API” for accessing reporting data.

In the navigation menu on left, hover over “APIs & Services” and click “Library”.

Search for “Google Analytics”. You should see the following results.
First, we will add the “Google Analytics API” library, so click on the “Google Analytics API” to go to the API page.

Click “Enable” to enable the API.

When enabled, you will be redirected to the Dashboard of the “Google Analytics API” library.

Step 4

Now you have to add the “Google Analytics Reporting API” liberary. Click on the “Hamburger” menu to open the navigation menu. Hover over “APIs & Services” and click “Library” to go back to the library search page.

Again search for “Google Analytics” and click on “Google Analytics Reporting API”.

Just like before, click on the “ENABLE” button. when enabled, you will be redirected to the Dashboard of “Google Analytics Reporting API”.

Step 5

This project need to be accessible externally. Click on the “Hamburger” menu to open the navigation menu. Hover over “APIs & Services” and click “OAuth consent screen”.

Set the “User Type” to “External” and click “Create”.

You will be redirected to the “App Registration” page. Add the following information:

  • App name (you can just put ‘My Analytify Keys’)
  • User support email (select your email from the list)
  • Email Address (Under “Developer contact information”, near the bottom. You can just put your own email here.)


Note: The information under “App domain” is not required. If you leave it empty, your App will be “unverified” and you will see an “Unverified App” alert when you will try to login from this app. If you add the information under (Application home page, Application privacy policy link, Application terms of server link), Google (in some time) will verify the App.

After clicking “SAVE AND CONTINUE”, you will be taken to the “Scopes” page, you don’t need to change anything here. Just click “SAVE AND CONTINUE”.

Now you will see the “Test User” page, you don’t need to change anything here as well. Just click “SAVE AND CONTINUE”.

And finally, just click on “BACK TO DASHBOARD” to return to the “OAuth consent screen” dashboard.

Step 6

You app is build but now it needs to be “Published”. To publish the app just click on the “PUBLISH APP” button.
A popup will ask for confirmation, just click “CONFIRM”. Your app is now published.

Step 7

Analytify needs credentials to be able to access this app. From the left menu, click on “Credentials”.

Once you are on the “Credentials” page, click “CREATE CREDENTIALS” and then on “OAuth client ID”.

You will be redirected to the “Create OAuth click ID” page.

In another tab, open the “wp-admin” of your site. Go To Analytify > Setting > Advanced (tab).
The “Setup Custom API keys” should be set to “Yes”.
You can see the URL next to “Redirect URL”. Copy it, you will need it later.

Now back to the Google Console tab. Set the “Application type” to “Web Application”. In the “Name” field, you can just put “Analytify” and under “Authorized redirect URIs”, click the “ADD URI” button and add the URL from Analytify’s Advance Setting page (that you just copied).

Click “CREATE”.

Your credentials have now been created.

On the Analytify’s Advanced Setting page, put the “Click ID” and “Client Secret” that you got from Google into their respective fields. The “Redirect URL” will be the URL you see written below. Just copy and paste from there and “Save Settings”.

Next, you have to authenticate your Google Analytics account with Analytify, In order to do this go to Analytify Settings > Authentication and click on “Login with your Google Analytics Account”.

Note: If you are already logged in, you would have to logout first and then log in.

After clicking on “Log in with your Google Analytics Account” you will be redirected to Google Accounts Authentication page, you have to select your Google Account that is associated with your Google Analytics account.

In the next step, you will be asked to Allow the permissions. You have to click on the “Allow” button.

App Verification Alert

You may will get the “This app isn’t verified” alert during the authentication of your Google account. You can continue without app verification by clicking on the “Advanced” option and on the “Go to *YOURDOMAINNAME* (unsafe)” link.

Although you can continue using an “Unverified App”, but if you like to get your app verified, click here and follow the steps.

You are now logged in. You will be redirected back to Analytify > Profiles here you need to select “Profiles for posts” and “Profile for dashboard”.

  • “Profiles for posts” is the profile used for tracking users.
  • “Profile for dashboard” is the profile used for showing stats on the Analytify’s Dashboard.

For most people both these options will be the same. After selection, click “Save Changes”.

Congratulations! you have successfully implemented the Google Analytics APIs key for Analytics Tracking in Analytify. This is how you can get the Client ID and Client Secret key from Google Developers Search Console.

How To Verify The App

Follow the following steps to get your app verified on Google Console.
Let’s begin.

Step 1

Open the Google Cloud Platform page. Open the dashboard of the project you just created (the project who’s keys you are using in Analytify).

Step 2

Click on the “Hamburger” menu to open the navigation menu. Hover over “APIs & Services” and click “OAuth consent screen”.

Step 3

You will be taken to the Dashboard of the App you created. Click on the “EDIT APP” link.

Step 4

Fill all the fields under “App domain”.

  • “Application home page” is the link of your website’s home page.
  • “Application privacy policy link” is the link to the privacy policy page of your website.
  • “Application terms of service link” is the link to the terms of service page of your website.

After filling the information with the appropriate links, click “SAVE AND CONTINUE”.

Step 5

You will be taken to the “Scopes” page, just click “SAVE AND CONTINUE”.
Again click “SAVE AND CONTINUE” on the “Optional info” page.
Lastly “BACK TO THE DASHBOARD” button on the “Summary” page.

Note: After you confirm or submit the app the Google Trust and Quality team will contact you through email to verify your property ownership through Google search console.

Step 6

Google’s trust and quality team will verify the data on your site and email you once they have verified your app.

33 thoughts on “How To Get Google Client ID And Client Secret From Google Developers Console

  1. Thanks a lot, Adnan. It was really helpful. I’ve tried other steps and almost gave up till I met this. I followed the procedure step by step and it got me the result I needed.

  2. Hello ! i am trying to authenticate using this script:

    from pydrive.auth import GoogleAuth
    from import GoogleDrive

    gauth = GoogleAuth()

    if gauth.credentials is None:
    elif gauth.access_token_expired:

    drive = GoogleDrive(gauth)

    but i got this error: KeyError: ‘_module’
    how can i fix it ?? thanks !

  3. I’m getting a similar issue to Mohammad. When I try to authenticate with my own API, it connects to Google, but once I click allow it redirects me back to a 404 page on my site instead of the analytify authentication page.

  4. Hi,
    After I configure my own analytics API key in the plugin when I try to login to my google analytics account I get 403 forbidden error.
    What is the problem?

  5. Hi,
    After I configure my own API key, when I try to login with google analytics account I get 403 Forbidden error.
    What is the problem?

  6. Help me please. I used to upload video on youtube channel – i have YOUTUBE_DEVELOPER_KEY
    gdata sends me error now. As a solve of this problem i wanted to go for API3 but it tells me to use
    CLIENT_SECRETS_FILE = “client_secrets.json”
    What is it? A once more new KEY? Or I cen gen it from

    1. In recent update to WP Analytify, You don’t need access code. Simply login with your Google account and you will be connect.

      Update your WP Analytify please.

      1. Ok, thanks. How do I update it Adnan!

        Just to let you know, that when I t to get short url from inside my blog, it went error, and then I couldn’t access my pages, so had to deactivate the plugin! So hope the updated version works.


        1. This what I get. Please advise. Thanks!

          Fatal error: Uncaught exception ‘Shortify_WP_Google_Service_Exception’ with message ‘Error calling POST (403) Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.’ in /home3/becomey1/public_html/wp-content/plugins/wp-shortify/src/Google/Http/REST.php:79 Stack trace: #0 /home3/becomey1/public_html/wp-content/plugins/wp-shortify/src/Google/Http/REST.php(44): Shortify_WP_Google_Http_REST::decodeHttpResponse(Object(Shortify_WP_Google_Http_Request)) #1 /home3/becomey1/public_html/wp-content/plugins/wp-shortify/src/Google/Client.php(503): Shortify_WP_Google_Http_REST::execute(Object(Shortify_WP_Google_Client), Object(Shortify_WP_Google_Http_Request)) #2 /home3/becomey1/public_html/wp-content/plugins/wp-shortify/src/Google/Service/Resource.php(195): Shortify_WP_Google_Client->execute(Object(Shortify_WP_Google_Http_Request)) #3 /home3/becomey1/public_html/wp-content/plugins/wp-shortify/src/Google/Service/Urlshortener.php(136): Shortify_WP_Google_Service_Resou in /home3/becomey1/public_html/wp-content/plugins/wp-shortify/src/Google/Http/REST.php on line 79

  7. Hi,,
    I created oauth for installed application i.e., android correctly, but when i downloaded json file in that client secret key is missing.How do i find it, is google changed their policy? Pls help me to find client secret key.

  8. You should update this tutorial. Google has changed its layout and your instructions do not reflect the actual page.

    I am getting a 401 error when requesting “Get your access code”.

  9. Hi,

    I just installed the plugin and it looks really great. But I miss the click route people have. Where can I see on a page where people came from and what page they went to after this particular page or post? I can’t find it in the overview.

    Thanks for your reply in advance.

    1. Hey, you are Premium Customer right ??

      You don’t need to enter Keys. Just authenticate and paste the Access code and it should work.

      Check this video for Premium customers.

Leave a Reply

Your email address will not be published.