POST
/
integrations
/
{integrationType}
/
select-property
{
  "success": true,
  "passthroughRedirectUri": "https://your-app.com/oauth/callback"
}

Select a specific property for integrations that require additional configuration after OAuth (e.g., Google Analytics).

URL Parameters

integrationType
string
required

The type of integration. Currently supported:

  • google-analytics

Request

temporaryAccessToken
string
required

The temporary access token received from the callback

propertyId
string
required

The ID of the property to select

externalUserIdentifier
string
required

Unique identifier for the user in your system

Response

success
boolean

Whether the property selection was successful

passthroughRedirectUri
string

The redirect URI provided during connection

Example

curl -X POST https://suada.ai/api/public/integrations/google-analytics/select-property \
  -H "Authorization: Bearer sk-suada-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "temporaryAccessToken": "temp-token-from-callback",
    "propertyId": "123456789",
    "externalUserIdentifier": "user-123"
  }'
{
  "success": true,
  "passthroughRedirectUri": "https://your-app.com/oauth/callback"
}

Error Codes

400
object

Invalid request

{
  "error": "Missing required parameters"
}
401
object

Authentication error

{
  "error": "Invalid or expired API key"
}
403
object

Invalid temporary token

{
  "error": "Invalid temporary access token"
}
500
object

Server error

{
  "error": "Failed to select property"
}

Notes

  • This endpoint is currently only used for Google Analytics integration
  • The temporaryAccessToken is received from the callback endpoint
  • The propertyId should be selected from the list of properties returned in the callback response
  • After successful property selection, redirect the user to the passthroughRedirectUri
  • The integration will be automatically enabled for the user after successful property selection