Connect a Shopify store with a custom-app Admin token
Token-paste alternative to the OAuth flow: connect a store using the
Admin API access token of a custom app the merchant created in their
own Shopify admin (Settings → Apps and sales channels → Develop apps,
with the read_content/write_content scopes). Use this when the
one-click OAuth connect is unavailable or when your users prefer not
to install a third-party app on their store. The token is validated
against the store before anything is saved; custom-app tokens do not
expire. Connecting the same profile to a store again replaces the
stored token in place.
API key authentication - use your Zernio API key as a Bearer token
In: header
Your Zernio profile ID (get from /v1/profiles).
The myshopify.com store domain, e.g. your-store.myshopify.com (the bare your-store prefix is accepted too).
Admin API access token of the merchant-created custom app (starts with shpat_).
Response 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.connectShopifyWithToken({ body: { profileId: 'profile_abc123', shop: 'string', accessToken: 'tok_abc123', },});console.log(data);{
"account": {
"_id": "string",
"platform": "shopify",
"username": "string",
"displayName": "string",
"profileId": "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).
Get Shopify OAuth connect URL GET
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.