Complete WhatsApp phone number selection
Bind a specific WhatsApp phone number to the Zernio profile after the user picks one from `listWhatsAppPhoneNumbers`. Exchanges the short-lived OAuth token for a long-lived token, subscribes the WABA to webhooks, and creates the SocialAccount.
API key authentication - use your Zernio API key as a Bearer token
In: header
Header Parameters
Alternative auth for API users' end customers
The Zernio profile ID
The selected phone number ID (from listWhatsAppPhoneNumbers)
The WABA ID containing the selected phone
The temporary access token from the headless redirect
Optional user profile data (passthrough)
Optional URL to receive the post-connection redirect target
Response Body
application/json
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.completeWhatsAppPhoneSelection({ body: { profileId: 'profile_abc123', phoneNumberId: 'phonenumber_abc123', wabaId: 'waba_abc123', tempToken: 'tok_abc123', },});console.log(data);{
"message": "WhatsApp phone number connected successfully",
"account": {
"accountId": "6507a1b2c3d4e5f6a7b8c9d0",
"platform": "whatsapp",
"username": "+55 83 8793-2039",
"displayName": "Bioface",
"isActive": true,
"selectedPhoneNumber": "+55 83 8793-2039"
}
}{
"error": "string",
"details": {}
}{
"error": "Unauthorized"
}{
"error": "string",
"details": {}
}{
"error": "string",
"details": {}
}Select Snapchat profile POST
Complete the Snapchat connection flow by saving the selected Public Profile. Snapchat requires a Public Profile to publish content. Use X-Connect-Token if connecting via API key.
Configure TikTok Ads Brand Identity PATCH
Set or update the Brand Identity (display name + avatar) for a `tiktokads` SocialAccount. TikTok requires every ad to carry an `identity_id + identity_type` pair. The Brand Identity is the CUSTOMIZED_USER alternative to attributing ads to a real @username (TT_USER). This route uploads the supplied image to TikTok, creates the identity via `/v2/identity/create/`, and caches the resulting `identity_id` on the account so subsequent `POST /v1/ads/create` calls can opt into it via `identityType: 'CUSTOMIZED_USER'`. Configurable on every `tiktokads` account, including linked-mode ones (those with a posting account on the same profile). Configuration is idempotent and harmless when posting is also connected: the default ad-create path still prefers TT_USER, and CUSTOMIZED_USER is only used per-ad when the caller explicitly opts in. TikTok identities are immutable post-creation. Re-saving creates a new identity on TikTok and swaps the cached id; the old identity stays orphaned on TikTok's side (harmless, no billing impact). Alternative: pass `brandIdentity` directly on `POST /v1/ads/create` to configure on first ad creation in a single round-trip.