Skip to main content
Blink supports the industry-standard OAuth 2.0 Authorization Code flow (with optional PKCE support). Using OAuth 2.0, third-party SaaS platforms, course hosts, automation tools, and plugins can let Blink merchants connect their store with a single click—without manually generating or pasting API keys.

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

  1. Log in to your Blink Dashboard and navigate to Developer → OAuth Apps (https://app.blink.store/developer/oauth-apps).
  2. 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/callback is also supported.
    • Default Scopes: The permissions your integration requires (e.g., products:read orders:read webhooks:write).
  3. Copy your client_id (blnk_client_...) and save your one-time client_secret (blnk_secret_...).
Verified Partner Badge: Official partner integrations can request verification from the Blink team to display a green Verified badge on the seller 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 your redirect_uri with a single-use authorization code (valid for 5 minutes) and your state:
If the user clicks Cancel, Blink redirects with ?error=access_denied&state=xyz987.

Step 3: Exchange the Code for an Access Token

From your backend server, make a POST 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).

Pass the access_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.