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.