How to Reconnect Broken Sparkforge Marketplace Apps
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?
What's the difference between sub-account and agency reconnect calls?
Does the Reconnect API return new tokens directly?
How long is the authorization code valid?
Where can I find Sparkforge API documentation?
Was this article helpful?
Thanks for the feedback.