Skip to main content

OAuth Callback (Web)

GET 

//:domain/amazon/callback

Amazon Seller Central OAuth callback endpoint. Amazon redirects the user here after they grant or deny SP-API access in Seller Central. This endpoint is a web route (not under /api), is invoked by the user's browser (not by SKU.io frontend code), and accepts any HTTP method (Route::any).

Flow:

  1. Validates the presence of spapi_oauth_code and state query params (400 if missing).
  2. Re-initializes tenancy from the state value.
  3. Loads the matching AmazonIntegrationInstance and exchanges the auth code for an access/refresh token via the Amazon SP-API connector.
  4. Persists the authenticator + selling_partner_id and marks the integration instance sync_status = ACTIVE and is_automatic_sync_enabled = true.
  5. Performs initial setup calls when not in fake-OAuth mode: fetches marketplace participations, requests initial reports, processes FBA state, and dispatches the initial Financial Event Groups + Orders refresh jobs onto the serial queue.
  6. Redirects the browser to /integrations/amazon/{integrationInstanceId}/dashboard.

The response is a 302 redirect to the Vue 2/Vue 3 Amazon integration dashboard for the instance — there is no JSON payload.

Request

Responses

Found

Response Headers
    Location