tap-gooddata-analytics(meltanolabs) requires clien...
# troubleshooting
j
tap-gooddata-analytics(meltanolabs) requires client_id, client_secret, refresh_token and access_token for auth. Our legacy in-house connector was ok without access_token. Does it relate to API version(v3 vs v4)? Is it possible to configure the tap so it does not require the access_token?
v
I can't find that tap on the hub 😕 tried searching github as well no luck Generally with oauth you only need a refresh token, and that will allow you to generate as many access tokens as you need to
j
Copy code
File "/home/jacek/work/src/panther-internal-analytics/data_pipeline/.meltano/extractors/tap-google-analytics/venv/lib/python3.10/site-packages/tap_google_analytics/tap.py", line 309, in _custom_initilization
    self.credentials = self._initialize_credentials()
  File "/home/jacek/work/src/panther-internal-analytics/data_pipeline/.meltano/extractors/tap-google-analytics/venv/lib/python3.10/site-packages/tap_google_analytics/tap.py", line 91, in _initialize_credentials
    access_token=self.config["oauth_credentials"]["access_token"],
KeyError: 'access_token'
I set TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS_CLIENT_ID, TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS_CLIENT_SECRET, and TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS_REFRESH_TOKEN
But it requires access_token too, it seems.
Copy code
- name: tap-google-analytics
    variant: meltanolabs
    pip_url: git+<https://github.com/MeltanoLabs/tap-google-analytics.git>
a
Could you use a dummy access token? As @visch states if auth fails the refresh token will be used to generate a new one.
j
meltano select tap-google-analytics --list
Copy code
2023-03-13 08:34:01,139 | INFO     | oauth2client.transport | Refreshing due to a 401 (attempt 1/2)
2023-03-13 08:34:01,139 | INFO     | oauth2client.client  | Refreshing access_token
2023-03-13 08:34:01,329 | INFO     | oauth2client.client  | Failed to retrieve access token: {
  "error": "invalid_grant",
  "error_description": "Bad Request"
}