How to Reconnect Broken Sparkforge Marketplace Apps

By Sparkforge Support Team ·Last reviewed May 3, 2026

If a Marketplace app loses its access or refresh token, call the Reconnect API to get a fresh authorization code, then exchange it through the standard Get Access Token flow. No user reauthorization needed.

If your Sparkforge Marketplace app loses its OAuth access token or refresh token — whether from a Sparkforge incident or an issue on your side — you can use the Reconnect API to recover authorization without prompting your users to reauthorize.

The Reconnect API returns a fresh authorizationCode. Pass that code into the standard Get Access Token endpoint (the OAuth Authorization Grant flow) to receive new access and refresh tokens.

Sub-account app connections

curl --location 'https://services.sparkforgehq.com/oauth/reconnect' \
--header 'Content-Type: application/json' \
--data '{
  "clientKey": "<client_id>",
  "clientSecret": "<client_secret>",
  "locationId": "<locationID where the app was installed>"
}'

Agency connections

curl --location 'https://services.sparkforgehq.com/oauth/reconnect' \
--header 'Content-Type: application/json' \
--data '{
  "clientKey": "<client_id>",
  "clientSecret": "<client_secret>",
  "companyId": "<company where the app was installed>"
}'

Response

{
  "authorizationCode": "<auth_code>",
  "expiresAt": "2024-10-08T13:35:43.887Z",
  "traceId": "trace-ID-ref"
}

Next step

Pass the returned authorizationCode to the Get Access Token endpoint using the OAuth Authorization Grant flow. The response gives you new access and refresh tokens, and the Marketplace app continues working without user intervention.

Developer support

For Sparkforge API issues or broken Marketplace apps, see the developer documentation at https://developers.sparkforge.com.

Frequently Asked Questions

When should I use the Reconnect API?
When your Marketplace app has lost the access or refresh token for a specific install — for example, after a token storage incident or an authentication bug. It avoids forcing users to reinstall the app.
What's the difference between sub-account and agency reconnect calls?
Sub-account calls require a locationId for the install. Agency-level calls require a companyId. Otherwise the endpoint and response shape are identical.
Does the Reconnect API return new tokens directly?
No. It returns an authorizationCode. Exchange that code through the standard Get Access Token endpoint (OAuth Authorization Grant flow) to receive the new access and refresh tokens.
How long is the authorization code valid?
Each response includes an expiresAt timestamp. Exchange the code before that time — otherwise call Reconnect again.
Where can I find Sparkforge API documentation?
Full developer documentation lives at developers.sparkforge.com, including OAuth flows, endpoint references, and support contacts.

Was this article helpful?