provider_connections

Complete provider OAuth connect

Leg 2: exchange the relayed authorization code and land the HubSpot connection. Upserts by portal (team, provider, external_account_id): re-consenting a portal already held rotates that row in place (result.reconnected true; same sid, the counter cleared, a failed row revived) instead of colliding with the name guard; a new portal is created (result.created true). The state is checked against the caller's team and spent once (422 oauth_state_invalid, _replayed, _expired, _team_mismatch); a refused code is 422 oauth_exchange_failed; a provider that gave no answer is 409 oauth_exchange_unconfirmed: start the connect again. The grant itself never appears in any response.

Contract:

  • MCP tool complete_provider_connection_oauth, registry package mcp.integrations/provider_connections, mount integrations.providers.
  • Operation action, response envelope action.
  • Flags: none.
post/api/provider-connections/oauth/complete

Request

  • Base URL
    https://beta.getsales.io/integrations/v1
  • Auth
    HTTP bearer and API key in header Team-SID

Request body

provider'hubspot' required

hubspot.

authorization_codestring required

The code the provider redirect carried.

statestring required

The state from start_provider_connection_oauth.

Response

action success envelope.

successtrue required
operation'action' required
actionstring required

kebab-case verb; matches the route segment.

Changes

No recorded changes to this operation across all 1 revision of this API.