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)
application/json- body
client_id*stringvizbl-app or vizbl-woocommerce.
1 <= length <= 64client_secret?stringConfidential clients only (vizbl-app); a public client must not send it.
1 <= length <= 256platform*string"shopify""woocommerce""bigcommerce""wix""custom"store*redirect_uri*stringWhere 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.
1 <= length <= 2048state*stringReturned unchanged on the redirect.
1 <= length <= 512code_challenge*stringbase64url(SHA-256(code_verifier)), without padding.
^[A-Za-z0-9_-]{43}$code_challenge_method*"S256""S256"shopify_id_token?stringvizbl-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.
^[\w-]+\.[\w-]+\.[\w-]+$length <= 4096application/json- response
status*"approval_required""approval_required"request_id*stringconsent_url*stringOpen it for the merchant: the Vizbl page where they approve or deny.
uriexpires_in*integerSeconds the request stays open.
0 < value <= 9007199254740991curl -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"}'{ "status": "approval_required", "request_id": "example-request-id", "consent_url": "https://cabinet.example.com/connect/store?request=example-request-id", "expires_in": 1800}A new store key, shown once; the previous keys of the store keep working for 24 hours. For a key bound to a store only POST
Previous Page
Exchange the one-time code for the store key (once; the same client, redirect_uri and the PKCE verifier). When the account had connected this store by consent already and its owner approved again, the keys the store had stop working at this exchange POST
Next Page