Skip to content

Commit 6385ec3

Browse files
authored
feat(source-hubspot): add oauth_connector_input_specification with granular scopes (#75574)
1 parent 7069ebe commit 6385ec3

4 files changed

Lines changed: 44 additions & 5 deletions

File tree

airbyte-integrations/connectors/source-hubspot/manifest.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,6 +2323,44 @@ spec:
23232323
- credentials_title
23242324
predicate_value: OAuth Credentials
23252325
oauth_config_specification:
2326+
oauth_connector_input_specification:
2327+
consent_url: "https://app.hubspot.com/oauth/authorize?{{client_id_param}}&{{redirect_uri_param}}&{{state_param}}&{{scopes_param}}&{{optional_scopes_param}}"
2328+
access_token_url: "https://api.hubapi.com/oauth/v1/token"
2329+
access_token_headers:
2330+
Content-Type: "application/x-www-form-urlencoded"
2331+
access_token_params:
2332+
client_id: "{{ client_id_value }}"
2333+
client_secret: "{{ client_secret_value }}"
2334+
code: "{{ auth_code_value }}"
2335+
redirect_uri: "{{ redirect_uri_value }}"
2336+
grant_type: "authorization_code"
2337+
scopes:
2338+
- scope: "crm.schemas.contacts.read"
2339+
- scope: "crm.objects.contacts.read"
2340+
- scope: "oauth"
2341+
optional_scopes:
2342+
- scope: "content"
2343+
- scope: "automation"
2344+
- scope: "e-commerce"
2345+
- scope: "files"
2346+
- scope: "files.ui_hidden.read"
2347+
- scope: "forms"
2348+
- scope: "forms-uploaded-files"
2349+
- scope: "sales-email-read"
2350+
- scope: "tickets"
2351+
- scope: "crm.lists.read"
2352+
- scope: "crm.objects.companies.read"
2353+
- scope: "crm.objects.custom.read"
2354+
- scope: "crm.objects.deals.read"
2355+
- scope: "crm.objects.feedback_submissions.read"
2356+
- scope: "crm.objects.goals.read"
2357+
- scope: "crm.objects.owners.read"
2358+
- scope: "crm.schemas.companies.read"
2359+
- scope: "crm.schemas.custom.read"
2360+
- scope: "crm.schemas.deals.read"
2361+
- scope: "crm.objects.leads.read"
2362+
extract_output:
2363+
- refresh_token
23262364
complete_oauth_output_specification:
23272365
type: object
23282366
additionalProperties: false

airbyte-integrations/connectors/source-hubspot/metadata.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ data:
66
hosts:
77
- api.hubapi.com
88
connectorBuildOptions:
9-
baseImage: docker.io/airbyte/source-declarative-manifest:7.14.0@sha256:5b95dd9e71defeece4a1efb27688b15e482f18c82c745498611846466b72403e
9+
baseImage: docker.io/airbyte/source-declarative-manifest:7.15.0@sha256:eecde84a1c8efced5b35f04900ed983eb306028d262cdb0673f26526aaabd7fc
1010
connectorSubtype: api
1111
connectorType: source
1212
definitionId: 36c891d9-4bd9-43ac-bad2-10e12756272c
13-
dockerImageTag: 6.4.0
13+
dockerImageTag: 6.4.1
1414
dockerRepository: airbyte/source-hubspot
1515
documentationUrl: https://docs.airbyte.com/integrations/sources/hubspot
1616
resourceRequirements:

airbyte-integrations/connectors/source-hubspot/unit_tests/test_source.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_streams(requests_mock, config):
8585
requests_mock.get("https://api.hubapi.com/crm/v3/schemas", json={}, status_code=200)
8686
streams = get_source(config).streams(config)
8787

88-
assert len(streams) == 34
88+
assert len(streams) == 35
8989

9090

9191
def test_streams_forbidden_returns_default_streams(requests_mock, config):
@@ -96,7 +96,7 @@ def test_streams_forbidden_returns_default_streams(requests_mock, config):
9696
status_code=403,
9797
)
9898
streams = get_source(config).streams(config)
99-
assert len(streams) == 34
99+
assert len(streams) == 35
100100

101101

102102
def test_check_credential_title_exception(config):
@@ -115,7 +115,7 @@ def test_streams_ok_with_one_custom_stream(requests_mock, config, mock_dynamic_s
115115
)
116116
streams = discover(get_source(config), config).catalog.catalog.streams
117117
assert adapter.called
118-
assert len(streams) == 35
118+
assert len(streams) == 36
119119

120120

121121
def test_check_connection_backoff_on_limit_reached(requests_mock, config):

docs/integrations/sources/hubspot.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ If you use [custom properties](https://knowledge.hubspot.com/properties/create-a
344344

345345
| Version | Date | Pull Request | Subject |
346346
|:------------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
347+
| 6.4.1 | 2026-04-03 | [75574](https://github.com/airbytehq/airbyte/pull/75574) | Add `oauth_connector_input_specification` with granular scopes and optional_scopes |
347348
| 6.4.0 | 2026-04-01 | [70920](https://github.com/airbytehq/airbyte/pull/70920) | Add new stream Users |
348349
| 6.3.5 | 2026-03-31 | [75665](https://github.com/airbytehq/airbyte/pull/75665) | Update dependencies |
349350
| 6.3.4 | 2026-03-30 | [75595](https://github.com/airbytehq/airbyte/pull/75595) | Fixed HTTP 429 responses mapped to RETRY instead of RATE_LIMITED, enabling correct rate-limit handling |

0 commit comments

Comments
 (0)