Anatomy of an API retirement: HubSpot's v1 OAuth sunset, call by call
On 16 February 2027, HubSpot turns off its v1 OAuth endpoints. In the migration guide's words: "After this date, calls to the v1 endpoints will begin returning errors".
That sentence is the whole problem in miniature. It tells you something will break. It doesn't tell you where in your code, which of the replacement endpoints is the right one, or how you'll know your fix works before your users find out it doesn't.
This post walks through one real retirement end to end: what the notices say, where they disagree with each other, where the affected code tends to hide, and what "done" should mean. It uses HubSpot because the case is current and well documented, but the shape repeats for almost every API sunset.
1. The notice is not one document
There is no single source of truth. For this retirement we found five, published across 2026:
- January changelog (27 January), announcing new OAuth endpoints and saying the v1 calls "are officially deprecated", with a timeline promised "later in Q1 2026".
- May changelog (12 May), giving the date: "the v1 API will be fully deprecated on February 16th, 2027".
- The v1 migration guide, undated, with the call-by-call mapping.
- An email to developers listing the apps that recently called v1 endpoints.
- HubSpot's latest token reference, which has since moved on to a newer API version.
Read only one and you get an incomplete and sometimes wrong picture. That's the first lesson of any retirement: collect every notice, and keep the exact words and the date you read them.
2. What actually changes
Four calls go away. Here is the mapping from the migration guide:
| Old call (v1) | New call | What your code must change |
|---|---|---|
POST /oauth/v1/token | POST /oauth/2026-03/token | New URL. Parameters go "as form-encoded body fields, not as query parameters". |
GET /oauth/v1/access-tokens/{token} | POST /oauth/2026-03/token/introspect | GET with the token in the path becomes a POST with a form body and token_type_hint=access_token. |
GET /oauth/v1/refresh-tokens/{token} | POST /oauth/2026-03/token/introspect | Same, with token_type_hint=refresh_token. |
DELETE /oauth/v1/refresh-tokens/{token} | POST /oauth/2026-03/token/revoke | DELETE becomes POST, token in the body. |
The install URL, consent page and scopes don't change. The reason given is security: the old endpoints take tokens in query parameters or in the URL path.
That looks like four find-and-replace jobs. It isn't, for two reasons. The response shape changes too: tokenType comes back as "Bearer" instead of "access" or "refresh", and new fields such as active and token_use appear. Any code that branches on the old value keeps compiling and quietly does the wrong thing. And the HTTP method changes for three of the four calls, so a URL swap alone produces a request that fails.
3. Where the notices disagree
Reading all five sources side by side, we counted ten disagreements. The ones that change what you'd write:
- Which replacement path. January says
/v3/tokenand/v3/introspect. May and the guide say/oauth/2026-03/.... The latest reference uses/oauth/2026-09/.... Three plausible targets, one cutoff. - "Identical" response. The guide says the new token endpoint returns "an identical response to the
/oauth/v1/tokenendpoint", then later tells you to confirm your code uses "the newaccess_tokenproperty". - Field names. The guide's table says
tokenType; the latest reference's example saystoken_type. Your parser will only match one. - Old path spelling. The changelog writes
/v1/token; the guide writes/oauth/v1/token. Search your code for one and you can miss the other. - The cutoff itself. "Fully deprecated on", "accessible until" and "Live: Feb 16". Nothing says what time, or in which time zone.
None of this is unusual. Vendors publish in stages, docs drift, and the latest page is rarely the one the migration guide links to. The practical fix is to pin one target version on purpose, and test against real recorded responses instead of trusting any single document.
4. Where the affected code hides
The guide itself names the places people forget: "CI/CD scripts, integration tests, and SDK wrappers". In practice, look in four places:
- Your own HTTP calls. Search for both path spellings and for the token-in-path pattern.
- SDK wrappers. If an SDK makes the call for you, you're waiting on its maintainers. On 5 October 2026 a developer asked in HubSpot's community, "Is there any plan to migrate the nodejs api library to use this", noting open GitHub issues "but there are no replies."
- Integration platforms. In June an n8n user posted HubSpot's email ("Starting February 16, 2027, all OAuth v1 API endpoints will return errors.") and asked whether n8n's HubSpot credentials would be updated. The GitHub issue was auto-closed as a feature request. A later second-hand reply said they will be updated, with no date.
- Scripts and tests. Token refresh in a deploy script or a test fixture fails just as hard and is usually found last.
HubSpot's email tells you which apps called v1 recently. It can't tell you which lines. That gap is where most of the work lives.
5. What "done" should mean
A retirement is finished when you can show it's finished, not when the diff merges. For this one, a reasonable bar:
- Every v1 call site found, including SDK and script call sites, with a list of the ones you don't own and who does.
- Each call moved to one pinned target version, with secrets out of URLs.
- Code that reads
tokenTypeupdated for "Bearer". - Contract tests against recorded responses for exchange, refresh, introspect (both hints) and revoke.
- A test that fails if a token or secret ever appears in a URL again.
- The vendor quotes and dates you relied on, saved next to the change, so the next person knows why.
The general pattern
Strip out the HubSpot details and every API retirement has the same anatomy: scattered notices that disagree, a change that is more than a rename, code hidden in places nobody owns, and no built-in way to prove the fix. Finding the code and proving the swap are the two parts the notices leave to you.
Sources (read 19 November 2026)
- HubSpot changelog, v1 OAuth API deprecation: https://developers.hubspot.com/changelog/v1-oauth-api-deprecation
- HubSpot v1 OAuth migration guide: https://developers.hubspot.com/docs/api-reference/legacy/authentication/oauth-tokens/v1/migration-guide
- HubSpot changelog, new OAuth v3 endpoints: https://developers.hubspot.com/changelog/new-oauth-v3-api-endpoints-and-standardized-error-responses
- HubSpot token reference (2026-09): https://developers.hubspot.com/docs/api-reference/latest/authentication/manage-oauth-tokens
- HubSpot community thread: https://community.hubspot.com/t/v1-oauth-api-deprecation/149267
- n8n community thread: https://community.n8n.io/t/notice-from-hubspot-about-oauth-v1-api-endpoint-sunset/298244
If you'd like a second pair of eyes, Portwell runs a free, read-only exposure check. It finds calls to HubSpot's v1 OAuth endpoints (/oauth/v1/token, /oauth/v1/access-tokens/ and /oauth/v1/refresh-tokens/) in one repository and shows each one with its file and line. It doesn't check your HubSpot app settings or the tools you've connected, so the steps above still apply. Ask for a free check