Get Shopify OAuth connect URL
Initiate the Shopify OAuth flow for a store. Shopify is a connect-only
platform: the connected account does not publish social posts, it powers
the Blogs API (/v1/accounts/{accountId}/blogs). Returns an authUrl
to redirect the merchant to; after they approve the install, Shopify
redirects their browser to Zernio's callback, the account is created on
the profile (platform shopify), and the browser is redirected to
redirect_url (or the Zernio dashboard when omitted). Requested scopes
are read_content and write_content (content only; no customer or
order data). Connecting the same profile to a store again refreshes the
stored token in place.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Your Zernio profile ID (get from /v1/profiles).
The myshopify.com store domain to connect, e.g. your-store.myshopify.com (the bare your-store prefix is accepted too).
Your custom redirect URL after connection completes. Accepts an http(s) URL, a custom app scheme for mobile deeplinks (e.g. myapp://callback), or a relative path. On failure an error query param is appended.
uriResponse Body
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.getShopifyConnectUrl({ query: { profileId: 'profile_abc123', shop: 'string', },});console.log(data);{
"authUrl": "http://example.com",
"state": "string"
}{
"error": "Unauthorized"
}{
"error": "Add a payment method to connect more than 2 accounts.",
"code": "PAYMENT_REQUIRED",
"reason": "free_tier_exceeded",
"documentation_url": "https://docs.zernio.com/billing/payment-method-required",
"dashboard_url": "https://zernio.com/dashboard?tab=billing",
"details": {
"free_tier_account_limit": 2,
"current_account_count": 3,
"has_payment_method": false
}
}Set default YouTube playlist PUT
Sets the default playlist used when publishing videos for this account. When a post does not specify a playlistId, the default playlist is not automatically used (it is stored for client-side convenience).
List posts GET
Returns a paginated list of posts. Published posts include platformPostUrl with the public URL on each platform.