List YouTube playlists
Returns the playlists available for a connected YouTube account. Use this to get a playlist ID when creating a YouTube post with the playlistId field.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.getYoutubePlaylists({ path: { accountId: 'account_abc123', },});console.log(data);{ "playlists": [ { "id": "PLxxxxxxxxxxxxx", "title": "Tutorials", "description": "Step-by-step video tutorials", "privacy": "public", "itemCount": 24, "thumbnailUrl": "https://i.ytimg.com/vi/xxx/mqdefault.jpg" }, { "id": "PLyyyyyyyyyyyyy", "title": "Vlogs", "description": "Weekly vlogs", "privacy": "public", "itemCount": 52, "thumbnailUrl": "https://i.ytimg.com/vi/yyy/mqdefault.jpg" } ], "defaultPlaylistId": null}Complete 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.
Create YouTube playlist
Creates an empty playlist on the connected YouTube channel. Requires a title; privacy defaults to private. Returns the same playlist shape as the list endpoint. Pass the returned playlist.id as platformSpecificData.playlistId when publishing a video. Does not change the account's default playlist. Requires the youtube or youtube.force-ssl OAuth scope. Costs 50 YouTube quota units. This operation is not idempotent and is not automatically retried: repeating a request can create another playlist, including after a timeout. List playlists before retrying an ambiguous failure. Official series settings are not exposed by YouTube's public API and must be enabled manually in YouTube's desktop playlist settings.