Source: ai-research/ghl-2026-05-01/support-solutions-articles-155000003717-how-to-reconnect-broken-marketplace-apps.md
When an OAuth access or refresh token gets lost or invalidated — whether from a HighLevel-side incident or a developer-side mistake — the Reconnect API issues a fresh authorization code that flows through the standard Get Access Token endpoint to recover a working token pair. The point of the API is recovery without forcing the end user back through an OAuth consent screen. Two payload variants exist: one for sub-account connections, one for agency connections.
Key Takeaways
- Endpoint:
POST https://services.leadconnectorhq.com/oauth/reconnectwithContent-Type: application/json. - Two scopes of reconnection. Sub-account reconnections carry
locationId; agency reconnections carrycompanyId. All variants require the app’sclientKeyandclientSecret. - Returns an authorization code, not a token. The response gives back an
authorizationCodeand anexpiresAttimestamp. Feed the code into the standard Get Access Token API (OAuth Authorization Code flow) to mint a new access/refresh token pair. - No user prompt required. This is the load-bearing benefit — users do not have to re-grant consent or re-install the app. The reconnection happens entirely via developer credentials.
- Recovery scenarios. HighLevel-side incidents that invalidate tokens, developer-side mistakes (deleted token store, deploy migration, accidental refresh-token rotation), or any case where you have proof of prior installation but no working tokens.
- Each authorization code has a short expiry (
expiresAtin the response). Exchange it promptly via the Get Access Token endpoint before it expires. - Trace ID returned for support escalation. The response includes a
traceIdfield — capture it in logs in case you need to file a ticket with the HighLevel API team.
Endpoint Reference
Sub-Account App Connections
curl --location 'https://services.leadconnectorhq.com/oauth/reconnect' \
--header 'Content-Type: application/json' \
--data '{
"clientKey": "",
"clientSecret": "",
"locationId": ""
}'Agency Connections
curl --location 'https://services.leadconnectorhq.com/oauth/reconnect' \
--header 'Content-Type: application/json' \
--data '{
"clientKey": "",
"clientSecret": "",
"companyId": ""
}'Response
{
"authorizationCode": "",
"expiresAt": "2024-10-08T13:35:43.887Z",
"traceId": "trace-ID-ref"
}Recovery Workflow
- Detect that an installation’s tokens are invalid (refresh attempt fails with
invalid_grant, or the token store entry is missing). - Look up the
locationId(sub-account) orcompanyId(agency) tied to the broken installation. - POST to
/oauth/reconnectwithclientKey,clientSecret, and the appropriate ID. - Capture the
authorizationCodefrom the response. - Exchange the authorization code for a new access/refresh token pair via the Get Access Token API.
- Store the new tokens in your token store, replacing the broken entry.
- Resume normal operation — no user-facing reconnect prompt required.
Use Cases
- Incident recovery. HighLevel publishes a notice that a subset of tokens were rotated; bulk-reconnect every affected installation without paging end users.
- Developer error. A deploy migration accidentally drops the token database; reconnect every known installation from the canonical record of
locationId/companyIdIDs. - Refresh-token rotation bugs. A bug in your token refresh logic invalidates the refresh token; reconnect to recover without sending users a “please reinstall” email.
- Cold migration. Moving a Marketplace app between hosting environments where the token store doesn’t transfer cleanly.
Related
- GoHighLevel
- OAuth 2.0
- GoHighLevel API Guide
- Developer Marketplace
- App Uninstall API
- API Security
- API Troubleshooting
Try It
- Pick a single test installation in a development sub-account and intentionally invalidate its refresh token (e.g., delete the token store row).
- Confirm the next API call against that installation fails with an auth error.
- Run the sub-account reconnect curl with that location’s
locationIdand your app credentials. - Capture the
authorizationCodefrom the response and exchange it via the Get Access Token endpoint. - Confirm the new token pair works by retrying the original API call.
- Build a runbook around this flow so on-call engineers can recover any installation without escalating to the HighLevel API team. For unresolved cases, escalate via https://developers.gohighlevel.com/ with the
traceIdfrom the response.