> Documentation index: https://docs.zernio.com/llms.txt. Every page is also Markdown: add .md to its URL.

# Connect

Connect a Spotify Ads Conversions API connection to a profile with its Connection ID and access token from Spotify Ads Manager.

The Spotify Conversions API takes a long-lived access token that Spotify Ads Manager generates for one connection. You give Zernio the token and the connection's ID. The token is stored encrypted.

## Get the token and Connection ID

You need to be a Business Admin of the business in Spotify Ads Manager.

1. Open **Events**, choose **Connect data source**, then **Conversions API**.
2. Copy the **Connection ID** from **View Conversions API Instructions**. It is a UUID.
3. Choose **Generate token** and copy it. This is not the Ads API login token.

## Connect with the token

Send both for a profile:

```bash
curl -X POST "https://zernio.com/api/v1/connect/spotify-ads/credentials" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profileId": "PROFILE_ID",
    "spotifyConnectionId": "0f8fad5b-d9cb-469f-a165-70867728950e",
    "accessToken": "SPOTIFY_CAPI_TOKEN"
  }'
```

```json
{ "accountId": "6507a1b2c3d4e5f6a7b8c9d0", "spotifyConnectionId": "0f8fad5b-d9cb-469f-a165-70867728950e", "accountName": "Spotify Ads connection 0f8fad5b" }
```

| Field | Where to find it |
|-------|------------------|
| `spotifyConnectionId` | **View Conversions API Instructions** in Spotify Ads Manager. Required. |
| `accessToken` | **Generate token** under Conversions API in Spotify Ads Manager: three parts separated by dots. Required. |
| `name` | A display name for the connection, up to 100 characters. Optional. |

## How it behaves

- Spotify has no way to check a token without sending an event, and a new token can take up to 20 minutes to work, so Zernio saves it without a check.
- Events refused in the first 30 minutes are sent again. After that, a refused token makes the connection ask to be reconnected.
- The connection ID becomes the connection's only destination. List it with `GET /v1/ads/conversions/destinations`.
- A profile holds one Spotify Ads connection. Connecting again with the same Connection ID replaces the token.
- Every call on this page is also a tool on the [Zernio MCP server](/mcp/tools).

## If it fails

| Error | Cause | Fix |
|-------|-------|-----|
| `400` on `spotifyConnectionId` | The id is missing or not a UUID | Copy it from **View Conversions API Instructions**. |
| `400` on `accessToken` | The token is missing, or is not a Conversions API token | Generate one under Conversions API. |
| `402` | The account cannot connect more accounts on its plan | Upgrade the plan or remove an account. |
| `403` | No ads access: a legacy plan without the Ads add-on | Move to usage-based billing, which includes ads, or turn on the Ads add-on. Then connect. |
| `409` with `profile_platform_conflict` | The profile already has another Spotify Ads connection | Disconnect it first, or use another profile. |

## Related

- [Connect Spotify Ads conversions](/connect/connect-spotify-ads-credentials)
- [List conversion destinations](/conversions/list-ad-conversion-destinations)
- [Conversions](/platforms/spotify-ads/conversions)