Skip to Content
Store Connection

Ask to connect a store: the merchant approves it on the Vizbl page at consent_url (no key; client authentication and PKCE S256). With a Shopify session token, a store that already has its Vizbl account is approved at once (status approved, with the code)

POST
/developer-api/store-connections/requests

Request Body

application/json
  1. body
client_id*string

vizbl-app or vizbl-woocommerce.

Length1 <= length <= 64
client_secret?string

Confidential clients only (vizbl-app); a public client must not send it.

Length1 <= length <= 256
platform*string
Value in"shopify""woocommerce""bigcommerce""wix""custom"
store*
redirect_uri*string

Where the merchant is sent back after the decision; the token request must repeat it exactly. vizbl-woocommerce: https, a /wp-admin/ path on the store's domain or its www. twin.

Length1 <= length <= 2048
state*string

Returned unchanged on the redirect.

Length1 <= length <= 512
code_challenge*string

base64url(SHA-256(code_verifier)), without padding.

Match^[A-Za-z0-9_-]{43}$
code_challenge_method*"S256"
Value in"S256"
shopify_id_token?string

vizbl-app, platform shopify only: the App Bridge session token of the merchant's admin session. It must be signed for this app and name the store (dest = https://<store.external_id>); otherwise invalid_request. A store already connected to a Vizbl account (or linked to one by the earlier Shopify app) is then approved at once: the answer is status approved with the code, and no consent page is shown.

Match^[\w-]+\.[\w-]+\.[\w-]+$
Lengthlength <= 4096

Response Body

application/json
  1. response
status*"approval_required"
Value in"approval_required"
request_id*string
consent_url*string

Open it for the merchant: the Vizbl page where they approve or deny.

Formaturi
expires_in*integer

Seconds the request stays open.

Range0 < value <= 9007199254740991
curl -X POST 'https://api.vizbl.com/developer-api/store-connections/requests' \  -H 'Content-Type: application/json' \  -d '{  "client_id": "vizbl-app",  "client_secret": "<client secret>",  "platform": "shopify",  "store": {    "external_id": "example.myshopify.com",    "domain": "example.com",    "domains": [      "www.example.com",      "example.myshopify.com"    ],    "name": "Example Store",    "email": "owner@example.com"  },  "redirect_uri": "https://app.example.com/store-connection/callback",  "state": "example-state",  "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",  "code_challenge_method": "S256"}'
Example Response
{  "status": "approval_required",  "request_id": "example-request-id",  "consent_url": "https://cabinet.example.com/connect/store?request=example-request-id",  "expires_in": 1800}