Skip to Content
Store Connection

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
/developer-api/store-connections/token

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
code*string
Length1 <= length <= 256
code_verifier*string

RFC 7636: 43–128 characters.

Match^[A-Za-z0-9._~-]{43,128}$
redirect_uri*string
Length1 <= length <= 2048
shopify_id_token?string

Shopify stores of vizbl-app: a fresh App Bridge session token of the store (they live one minute). With it Vizbl also gets its own offline Shopify token for the store, used to check the charges the app makes; an invalid one is invalid_request, one of another store invalid_grant.

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

Response Body

invalid_grant (unknown, expired or used code; client, redirect_uri or verifier mismatch; store disconnected) or invalid_request

application/json
  1. response
error*string
Value in"invalid_request""invalid_client""invalid_grant""unauthorized_client"
error_description*string
Example Request
curl -X POST 'https://api.vizbl.com/developer-api/store-connections/token' \  -H 'Content-Type: application/json' \  -d '{  "client_id": "vizbl-app",  "client_secret": "<client secret>",  "code": "example-one-time-code",  "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",  "redirect_uri": "https://app.example.com/store-connection/callback"}'
Example Response
{  "error": "invalid_request",  "error_description": "string"}