Skip to main content
GET
/
api
/
v2
/
public
/
linked-account
/
integration
/
oauth-url
/
:slug
curl -X GET "https://app.refold.ai/api/v2/public/linked-account/integration/oauth-url/{slug}" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID"
{
  "auth_url": "https://app.hubspot.com/oauth/authorize?client_id=YOUR_CLIENT_ID&state=REDACTED_STATE&redirect_uri=https%3A%2F%2Fapp.refold.ai%2Fapi%2Fv1%2Fhubspot%2Fcallback&scope=crm.objects.owners.read%20oauth"
}
Build the OAuth authorization URL for an app and linked account. Redirect the user to the returned auth_url to start the consent flow; after they approve, Refold completes the token exchange and attaches the integration to the linked account. The app must be an OAuth2 app. Some integrations require per-app prerequisite values supplied as query parameters — these vary by app.

Authentication

x-api-key
string
required
Your Refold API key. Find it in Settings → Credentials.
linked_account_id
string
required
The linked account the connection will be attached to.

Path Parameters

slug
string
required
The OAuth2 app slug.Example: hubspot

Response

auth_url
string
The OAuth authorization URL. Redirect the user here to begin the consent flow.
{
  "auth_url": "https://app.hubspot.com/oauth/authorize?client_id=YOUR_CLIENT_ID&state=REDACTED_STATE&redirect_uri=https%3A%2F%2Fapp.refold.ai%2Fapi%2Fv1%2Fhubspot%2Fcallback&scope=crm.objects.owners.read%20oauth"
}
curl -X GET "https://app.refold.ai/api/v2/public/linked-account/integration/oauth-url/{slug}" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID"