> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suada.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Select Integration Property

> Select a property for integrations that require it

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

## URL Parameters

<ParamField path="integrationType" type="string" required>
  The type of integration. Currently supported:

  * `google-analytics`
</ParamField>

## Request

<ParamField body="temporaryAccessToken" type="string" required>
  The temporary access token received from the callback
</ParamField>

<ParamField body="propertyId" type="string" required>
  The ID of the property to select
</ParamField>

<ParamField body="externalUserIdentifier" type="string" required>
  Unique identifier for the user in your system
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the property selection was successful
</ResponseField>

<ResponseField name="passthroughRedirectUri" type="string">
  The redirect URI provided during connection
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  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"
    }'
  ```

  ```typescript TypeScript theme={null}
  import { Suada } from '@suada/node';

  const suada = new Suada({
    apiKey: 'your-api-key'
  });

  const result = await suada.selectIntegrationProperty('google-analytics', {
    temporaryAccessToken: 'temp-token-from-callback',
    propertyId: '123456789',
    externalUserIdentifier: 'user-123'
  });

  // Redirect user back to their application
  window.location.href = result.passthroughRedirectUri;
  ```

  ```python Python theme={null}
  from suada import Suada, SuadaConfig

  suada = Suada(
      config=SuadaConfig(
          api_key="your-api-key"
      )
  )

  result = suada.select_integration_property(
      integration_type="google-analytics",
      temporary_access_token="temp-token-from-callback",
      property_id="123456789",
      external_user_identifier="user-123"
  )

  # Redirect user back to result.passthrough_redirect_uri
  ```
</CodeGroup>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "passthroughRedirectUri": "https://your-app.com/oauth/callback"
  }
  ```
</ResponseExample>

## Error Codes

<ResponseField name="400" type="object">
  Invalid request

  ```json theme={null}
  {
    "error": "Missing required parameters"
  }
  ```
</ResponseField>

<ResponseField name="401" type="object">
  Authentication error

  ```json theme={null}
  {
    "error": "Invalid or expired API key"
  }
  ```
</ResponseField>

<ResponseField name="403" type="object">
  Invalid temporary token

  ```json theme={null}
  {
    "error": "Invalid temporary access token"
  }
  ```
</ResponseField>

<ResponseField name="500" type="object">
  Server error

  ```json theme={null}
  {
    "error": "Failed to select property"
  }
  ```
</ResponseField>

## Notes

* This endpoint is currently only used for Google Analytics integration
* The `temporaryAccessToken` is received from the [callback endpoint](/api-reference/integrations/callback)
* 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
