Skip to content

Migrate OAuth token endpoints to the 2026-03 API (OME-796) - #2

Open
mjdobbins12 wants to merge 1 commit into
masterfrom
mjdobbins12/ome-796/update-hubspot-oauth-endpoints
Open

Migrate OAuth token endpoints to the 2026-03 API (OME-796)#2
mjdobbins12 wants to merge 1 commit into
masterfrom
mjdobbins12/ome-796/update-hubspot-oauth-endpoints

Conversation

@mjdobbins12

Copy link
Copy Markdown
Collaborator

HubSpot sunsets the legacy /oauth/v1/ token endpoints on 2027-02-16. Move the three OAuth codegen operations to the 2026-03 replacements:

  • TokensApi#create: POST /oauth/v1/token -> POST /oauth/2026-03/token (already form-encoded; response is identical, so no model change).
  • AccessTokensApi#get and RefreshTokensApi#get: GET /oauth/v1/{access,refresh}-tokens/{token} -> POST /oauth/2026-03/token/introspect, with token, token_type_hint, client_id and client_secret sent as form-body params (never in the URL). Introspection returns a raw hash rather than a strict model, since the 2026-03 introspect fields differ from v1.
  • RefreshTokensApi#archive: DELETE /oauth/v1/refresh-tokens/{token} -> POST /oauth/2026-03/token/revoke, token in the form body.

Method names/signatures are unchanged so callers are unaffected. No /oauth/v1/ path remains in the gem.

HubSpot sunsets the legacy /oauth/v1/ token endpoints on 2027-02-16. Move the
three OAuth codegen operations to the 2026-03 replacements:

- TokensApi#create: POST /oauth/v1/token -> POST /oauth/2026-03/token
  (already form-encoded; response is identical, so no model change).
- AccessTokensApi#get and RefreshTokensApi#get: GET /oauth/v1/{access,refresh}-tokens/{token}
  -> POST /oauth/2026-03/token/introspect, with token, token_type_hint, client_id and
  client_secret sent as form-body params (never in the URL). Introspection returns a raw
  hash rather than a strict model, since the 2026-03 introspect fields differ from v1.
- RefreshTokensApi#archive: DELETE /oauth/v1/refresh-tokens/{token}
  -> POST /oauth/2026-03/token/revoke, token in the form body.

Method names/signatures are unchanged so callers are unaffected. No /oauth/v1/ path
remains in the gem.
@mjdobbins12
mjdobbins12 requested a review from macharmi August 7, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant