Skip to content

Create a google project at google console

Stefan Kientzler edited this page Apr 25, 2023 · 14 revisions

First step is to create and setup a new project on the google console at https://console.cloud.google.com/.

  1. Create a project with your prefered name
  2. Enable the Google People API
  3. Create Credentials
    • Credential Type
      • Select API: People API
      • Check the 'User data' option
    • OAuth Consent Screen
      • Enter App information an Developer contact information
    • Scopes
      • Type contacts in the filter and then set check to
        [x] .../auth/contacts
        [x] .../auth/contacts.readonly
        [x] .../auth/contacts.other.readonly.
    • OAuth Client ID
      • Select Application type: Web application
      • Enter a name for your client (The name of your OAuth 2.0 client is only used to identify the client in the console and will not be shown to end users)
      • Authorized redirect URIs
        • For live system enter the URI to the script that receives an authentication code after login
        • For local development and using the examplecode enter http://localhost/<path-to-package>/GoogleOauth2Callback.php
    • Your Credentials
      Download the created credential information in JSON format. For later access, this is always available on the credentials page.

      For a 'quick start' of the example code, save the credentials in secrets/google_secrets.json in the package directory

  4. Add Test user(s)
    While developing/testing your app, you have to add the users that have access asd 'test user'. (Even the own account have to be added):
    • Join 'APIs & services -> OAuth consent screen' on the left in the google console
    • scroll to the section 'Test users'
    • add the users you want to have access to your web application (including your own account)

Clone this wiki locally