Skip to content

Approve

POST/admin/v1/stores/{store_id}/apps/authorize
  • apps:manage
  • Idempotency-Key supported

Approve: installs (or updates) the app and returns the redirect carrying a one-minute, single-use code. , a staff session and every scope granted.

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • client_idstringrequired
  • redirect_uristringrequired

    Must exactly match one of the app's registered redirect URLs.

  • scopestring · or null

    Space- or comma-separated scopes, within the app's manifest. The grant is always the manifest's scopes; the token response reports them.

  • statestring · or null

    Returned unchanged to the app, to bind the response to its request.

  • code_challengestring · or null

    PKCE (RFC 7636): BASE64URL(SHA256(code_verifier)).

  • code_challenge_methodstring · or null

    S256 when a challenge is sent.

  • accepted_scopesarray of strings

    Approving only: exactly the previewed scopes.

  • plan_idstring · or null

    Approving a first install of a paid app: the chosen plan.

Returns

200 Send the browser to redirect_to.

Errors

  • 403forbiddenMissing apps:manage, not staff, or a scope you do not hold.
  • 404not_foundUnknown client, or the app is not available to this store.
  • 409The app's scopes changed since the preview.
  • 422validation_failedInvalid request.