1. Authorize
Redirect the seller to
/oauth/authorize to select their store and approve your requested permissions.2. Exchange Code
Exchange the 5-minute
code at POST /api/oauth/token for a store-scoped access_token.3. Call Blink APIs
Use
Authorization: Bearer <access_token> across all /api/v1/* endpoints and webhooks.Step 1: Register Your OAuth Application
- Log in to your Blink Dashboard and navigate to Developer → OAuth Apps (
https://app.blink.store/developer/oauth-apps). - Click New OAuth App and configure:
- Application Name & Description: Displayed to sellers on the consent screen.
- Logo & Website URL: Your brand icon and homepage.
- Allowed Redirect URIs: One or more callback URLs (e.g.,
https://yourapp.com/oauth/blink/callback). For local testing,http://localhost:3000/callbackis also supported. - Default Scopes: The permissions your integration requires (e.g.,
products:read orders:read webhooks:write).
- Copy your
client_id(blnk_client_...) and save your one-timeclient_secret(blnk_secret_...).
Step 2: Redirect Sellers to the Consent Screen
When a user clicks “Connect with Blink” in your application, redirect their browser to:Query Parameters
Example Authorization URL
Handling the Callback
Once the seller selects their store and clicks Authorize, Blink redirects them back to yourredirect_uri with a single-use authorization code (valid for 5 minutes) and your state:
?error=access_denied&state=xyz987.
Step 3: Exchange the Code for an Access Token
From your backend server, make aPOST request to https://app.blink.store/api/oauth/token (supports both application/json and application/x-www-form-urlencoded, as well as HTTP Basic Auth):
Example Response
Token Lifespan: Like Shopify and Stripe Connect OAuth tokens, Blink OAuth
access_token values do not expire automatically—they remain active until revoked by the partner (POST /api/oauth/revoke), rotated via grant_type=refresh_token, or revoked by the seller in their Blink Dashboard (Developer → API Keys).Step 4: Calling Blink APIs & Verifying the Store
Pass theaccess_token in the Authorization: Bearer <access_token> header on any /api/v1/* request. Because each OAuth token is bound directly to the authorized store, you do not need to pass an x-store-id header.
To verify the token and retrieve the connected store’s profile at any time, call GET /api/v1/me:
Available OAuth Scopes
Assign only the scopes your application needs. If no scopes are specified (scope omitted and Default Scopes left empty), full store access (*) is requested.