انتقل إلى المحتوى

لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.

Approve

POST/admin/v1/stores/{store_id}/apps/authorize
  • apps:manage
  • يدعم Idempotency-Key

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

معاملات المسار

  • store_idstringمطلوب

    معرّف من نوع store، مثل store_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.

الترويسات

  • Idempotency-Keystring

    أرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.

  • shop-api-versionYYYY-MM

    الإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.

الجسم

  • client_idstringمطلوب
  • redirect_uristringمطلوب

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

  • scopestring · أو 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 · أو null

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

  • code_challengestring · أو null

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

  • code_challenge_methodstring · أو null

    S256 when a challenge is sent.

  • accepted_scopesarray of strings

    Approving only: exactly the previewed scopes.

  • plan_idstring · أو null

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

ما يُرجعه

200 Send the browser to redirect_to.

الأخطاء

  • 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.