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:

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 callWhat your code must change
POST /oauth/v1/tokenPOST /oauth/2026-03/tokenNew URL. Parameters go "as form-encoded body fields, not as query parameters".
GET /oauth/v1/access-tokens/{token}POST /oauth/2026-03/token/introspectGET 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/introspectSame, with token_type_hint=refresh_token.
DELETE /oauth/v1/refresh-tokens/{token}POST /oauth/2026-03/token/revokeDELETE 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:

  1. Which replacement path. January says /v3/token and /v3/introspect. May and the guide say /oauth/2026-03/.... The latest reference uses /oauth/2026-09/.... Three plausible targets, one cutoff.
  2. "Identical" response. The guide says the new token endpoint returns "an identical response to the /oauth/v1/token endpoint", then later tells you to confirm your code uses "the new access_token property".
  3. Field names. The guide's table says tokenType; the latest reference's example says token_type. Your parser will only match one.
  4. 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.
  5. 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:

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:

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)

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