OverviewProductsPlatformsAPI ReferenceResources

Connect the chosen Google Analytics property

POSThttps://zernio.com/api/v1/connect/googleanalytics/select-property

For headless flows. Connects the property the user picked as a googleanalytics account and returns where to send the user next.

  • On success: your redirect_url with connected=googleanalytics, profileId, accountId and username.
  • When the connect was refused (for example a billing block): an error.

Consumes the pendingDataToken; a refused or failed attempt leaves it usable for a retry.

Send your API key (or connect token) for the same profile with a headless token.

Authentication

One of these

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

One of these

X-Connect-TokenAPI key in headerRequired

Short-lived connect token for API users during OAuth flows. Automatically generated when initiating OAuth without a browser session. Valid for 15 minutes. Connect tokens are scoped to the intended profile and platform and are accepted only by connection-flow endpoints that explicitly list this security scheme.

Body

application/json

What every request needs

pendingDataTokenstringRequired

Token from the headless redirect.

propertyIdstringRequired

A propertyId from the properties list.

Responses

Success· the request worked

Errors· the request failed

POST/v1/connect/googleanalytics/select-property
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.selectGoogleAnalyticsProperty({  body: {    pendingDataToken: 'tok_abc123',    propertyId: '312456789',  },});console.log(data);
{  "redirect_url": "string",  "account": {    "accountId": "string",    "platform": "string",    "username": "string",    "displayName": "string"  }}
OpenAPI specification
Was this page helpful?