Source: Setup Oauth2

Hi

I am currently trying to program a connector for us which could return the location metrics from My Business. Unfortunately I seem to fail already when setting up the authentication. I am attempting to do this based on existing Google Connectors.

Is there a example how to set up Oauth2 and what am I currently doing wrong?

❯ python main.py check --config secrets/config.json   
{"type": "CONNECTION_STATUS", "connectionStatus": {"status": "FAILED", "message": "Config validation error: 'Client' was expected"}}
documentationUrl: https://docs.airbyte.com/integrations/sources/google-my-business
connectionSpecification:
  $schema: http://json-schema.org/draft-07/schema#
  title: Google My Business Source Spec
  type: object
  required:
    - account_id
  additionalProperties: true
  properties:
    account_id:
      type: string
      title: Account Id
      description: >-
        Enter the link to the Google spreadsheet you want to sync
      examples:
        - https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG-arw2xy4HR3D-dwUb/edit
    credentials:
      type: object
      title: Authentication
      description: >-
        Credentials for connecting to the Google Sheets API
      oneOf:
        - title: Authenticate via Google (OAuth)
          type: object
          required:
            - client_id
            - client_secret
            - refresh_token
          properties:
            auth_type:
              type: string
              const: Client
            client_id:
              title: Client ID
              type: string
              description: "Enter your Google application's Client ID"
              airbyte_secret: true
            client_secret:
              title: Client Secret
              type: string
              description: "Enter your Google application's Client Secret"
              airbyte_secret: true
            refresh_token:
              title: Refresh Token
              type: string
              description: "Enter your Google application's refresh token"
              airbyte_secret: true
            access_token:
              title: Access Token
              type: string
              description: "Access Token for making authenticated requests"
              airbyte_secret: true  
        - title: Service Account Key Authentication
          type: object
          required:
            - auth_type
            - service_account_info
          properties:
            auth_type:
              type: string
              const: Service
            service_account_info:
              type: string
              title: Service Account Information.
              description: 'Enter your Google Cloud <a href="https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys">service account key</a> in JSON format'
              airbyte_secret: true
              examples:
                - '{ "type": "service_account", "project_id": YOUR_PROJECT_ID, "private_key_id": YOUR_PRIVATE_KEY, ... }'
authSpecification:
  auth_type: oauth2.0
  oauth2Specification:
    rootObject:
      - credentials
      - 0
    oauthFlowInitParameters:
      - ["client_id"]
      - ["client_secret"]
    oauthFlowOutputParameters:
      - ["access_token"]
      - ["refresh_token"]

My config.json currently looks like this

{
  "credentials": {
    "auth_type": "oauth2",
    "credentials_json": {
      "client_id": "",
      "client_secret": "",
      "refresh_token": ""
    }
  },
  "account_id": ""
}

I would be grateful for any help.

Hello there! You are receiving this message because none of your fellow community members has stepped in to respond to your topic post. (If you are a community member and you are reading this response, feel free to jump in if you have the answer!) As a result, the Community Assistance Team has been made aware of this topic and will be investigating and responding as quickly as possible.
Some important considerations that will help your to get your issue solved faster:

  • It is best to use our topic creation template; if you haven’t yet, we recommend posting a followup with the requested information. With that information the team will be able to more quickly search for similar issues with connectors and the platform and troubleshoot more quickly your specific question or problem.
  • Make sure to upload the complete log file; a common investigation roadblock is that sometimes the error for the issue happens well before the problem is surfaced to the user, and so having the tail of the log is less useful than having the whole log to scan through.
  • Be as descriptive and specific as possible; when investigating it is extremely valuable to know what steps were taken to encounter the issue, what version of connector / platform / Java / Python / docker / k8s was used, etc. The more context supplied, the quicker the investigation can start on your topic and the faster we can drive towards an answer.
  • We in the Community Assistance Team are glad you’ve made yourself part of our community, and we’ll do our best to answer your questions and resolve the problems as quickly as possible. Expect to hear from a specific team member as soon as possible.

Thank you for your time and attention.
Best,
The Community Assistance Team