So I managed with the OAuth2 tokens somehow, but n...
# getting-started
s
So I managed with the OAuth2 tokens somehow, but now ran into the fact that basically the tap-hubspot is broken since end of Feb due to the fact it requests the “contacts” scope, which no longer exists. Log in thread below. https://developers.hubspot.com/docs/api/oauth/contacts-scope-migration
Copy code
CRITICAL b'{"status":"error","message":"This app hasn\'t been granted all required scopes to make this call. Read more about required scopes here: <https://developers.hubspot.com/scopes>.","correlationId":"c19b6aa6-829f-4c62-9c30-dcc01a7c319d","errors":[{"message":"One or more of the following scopes are required.","context":{"requiredScopes":["contacts"]}}],"links":{"scopes":"<https://developers.hubspot.com/scopes>"},"category":"MISSING_SCOPES"}'
Traceback (most recent call last):
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/bin/tap-hubspot", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/lib/python3.8/site-packages/tap_hubspot/__init__.py", line 1110, in main
    raise exc
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/lib/python3.8/site-packages/tap_hubspot/__init__.py", line 1107, in main
    main_impl()
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/lib/python3.8/site-packages/tap_hubspot/__init__.py", line 1099, in main_impl
    do_discover()
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/lib/python3.8/site-packages/tap_hubspot/__init__.py", line 1082, in do_discover
    json.dump(discover_schemas(), sys.stdout, indent=4)
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/lib/python3.8/site-packages/tap_hubspot/__init__.py", line 1063, in discover_schemas
    schema, mdata = load_discovered_schema(stream)
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/lib/python3.8/site-packages/tap_hubspot/__init__.py", line 1037, in load_discovered_schema
    schema = load_schema(stream.tap_stream_id)
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/lib/python3.8/site-packages/tap_hubspot/__init__.py", line 202, in load_schema
    v3_schema = get_v3_schema(entity_name)
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/lib/python3.8/site-packages/tap_hubspot/__init__.py", line 179, in get_v3_schema
    return parse_custom_schema(entity_name, request(url).json()['results'])
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/lib/python3.8/site-packages/backoff.py", line 286, in retry
    ret = target(*args, **kwargs)
  File "/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/lib/python3.8/site-packages/tap_hubspot/__init__.py", line 309, in request
    raise SourceUnavailableException(resp.content)
tap_hubspot.SourceUnavailableException: b'{"status":"error","message":"This app hasn\'t been granted all required scopes to make this call. Read more about required scopes here: <https://developers.hubspot.com/scopes>.","correlationId":"c19b6aa6-829f-4c62-9c30-dcc01a7c319d","errors":[{"message":"One or more of the following scopes are required.","context":{"requiredScopes":["contacts"]}}],"links":{"scopes":"<https://developers.hubspot.com/scopes>"},"category":"MISSING_SCOPES"}'
2022-04-15T13:51:55.922345Z [debug    ] Deleted configuration at /home/ubuntu/meltano/meltano-hubspot/.meltano/run/tap-hubspot/tap.0f74f1df-3c44-40dd-a626-e7dbe5d02fc1.config.json
2022-04-15T13:51:55.923518Z [debug    ] Cannot list the selected attributes: Catalog discovery failed: command ['/home/ubuntu/meltano/meltano-hubspot/.meltano/extractors/tap-hubspot/venv/bin/tap-hubspot', '--config', '/home/ubuntu/meltano/meltano-hubspot/.meltano/run/tap-hubspot/tap.0f74f1df-3c44-40dd-a626-e7dbe5d02fc1.config.json', '--discover'] returned 1
I turns out the error is misleading. If you assign all CRM scopes it still works.
However: The legacy
contacts
scope will be officially deprecated on July 31st, 2022, so you will need to make these updates for your app to continue working.
According to the linked document
Not sure if this refers to the app you create with Hubspot dev account or if the tap needs to be updated too