Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

max-ostapenko/api_examples

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
14 Commits
 
 
 
 

Repository files navigation

Google API examples

Contents

  1. Python Notebook

    Open In Colab

  2. JS web client

  3. Python web application

    • insert 'client_secret.json' file into the folder

    • run:

      python server.py

FAQ

  1. How to get CLIENT_ID and CLIENT_SECRET?

  2. How to get client_secret.json?

  3. How to resolve authentication error 'unknown origin'?

    • add your domain to the list of authorized domains in the Google API Console. Your client_secret.json should look like this:

      {
          "web": {
              "client_id": ...,
              "project_id": "max-ostapenko",
              "auth_uri": "https://accounts.google.com/o/oauth2/auth",
              "token_uri": "https://oauth2.googleapis.com/token",
              "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
              "client_secret": ...,
              "redirect_uris": [
              "https://max-ostapenko.github.io/api_examples/examples/ga4_client_js/data_api.html",
              "https://localhost/oauth2callback"
              ],
              "javascript_origins": [
              "https://max-ostapenko.github.io",
              "https://localhost"
              ]
          }
      }

About

User and server-side templates for a quickstart with Google APIs

Resources

Stars

Watchers

Forks

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.