Exchange a hosted OAuth callback code, store the token in the configured vault, and persist a Secret Manager ref

post/connections/callback-exchange

Request

  • Base URL: https://api.gravityads.dev (the document declares no server; this is the origin it was published from)
  • URL: https://api.gravityads.dev/connections/callback-exchange
  • Auth: HTTP bearer

Request body

statestring required
codestring required

Raw provider authorization code. It is exchanged server-side and is never returned or logged.

redirect_uristring uri required
client_idstring

Optional override; production should use env config.

code_verifierstring

PKCE verifier loaded by the Portal/connector boundary.

secret_manager_resourcestring

Optional Secret Manager secret resource override. Production defaults to GRAVITYADS_OAUTH_SECRET_RESOURCE_TEMPLATE and only a hash is returned.

kms_key_resourcestring
version_aliasstring

Response

OAuth token exchanged

status'connections_callback_exchange_completed' required
tenant_idstring required
platformstring required
connection_idstring required
secret_ref_idstring
account_upsertobject
account_discoveryobject
reauthorizationboolean

Existing connection authorization was renewed without changing selected accounts or ETL assignments; inspect account_sync independently.

next_stepstring

Google renewal returns to connections; Meta may select_accounts, return_to_connections or retry_account_sync.

vaultobject
token_response_metadataobject
permission_probeobject
connectionobject
ready_for_readonly_etlboolean required
database_url_configuredboolean required
hosted_auth_contextobject
raw_authorization_code_returnedfalse required
raw_token_material_returnedfalse required
raw_secrets_returnedfalse required

Changes

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