> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanova.io/llms.txt
> Use this file to discover all available pages before exploring further.

# إزالة رمز API

> DELETE /console/token/{key}/

يُلغي مفتاح Management API نهائيًا. مثل [إنشاء رمز](/ar/api-reference/management-api/tokens/create)، تقع نقطة النهاية هذه على مضيف Scanova API **العادي** (‏`qcg-api.scanova.io`) وتُصادَق برمز وصول OAuth العادي الخاص بلوحة التحكم — لا بالمفتاح الذي تحذفه.

## الطلب

```
DELETE https://qcg-api.scanova.io/console/token/{key}/
Authorization: Bearer <your_oauth_access_token>
```

<ParamField path="key" type="string" required>
  قيمة المفتاح الكاملة التي أُعيدت عند إنشاء الرمز (وليست معرّفًا رقميًا).
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://qcg-api.scanova.io/console/token/401f7ac837da42b97f613d789819ff93537bee6a/" \
    -H "Authorization: Bearer <your_oauth_access_token>"
  ```
</RequestExample>

<ResponseExample>
  ```text 204 No Content theme={null}
  ```
</ResponseExample>

## السلوك

* الإزالة الناجحة تعيد `204 No Content` بنص فارغ.
* بمجرد الحذف، يتوقف المفتاح عن المصادقة على مضيف البيانات فورًا — أي طلبات جارية أو لاحقة تستخدمه تحصل على `401`.
* يمكنك حذف مفتاح تملكه فقط (أو، بالنسبة لمستخدم مشارك، مفتاحًا أنشأه ذلك المستخدم المشارك).

<Note>
  الحذف يعيد أيضًا فحص حصة الخطة باستخدام قيمة `environment`، بالقيمة الافتراضية `sandbox` إذا لم تمرر واحدة — نفس القاعدة الموصوفة في صفحة [إنشاء رمز](/ar/api-reference/management-api/tokens/create#listing-existing-tokens). نادرًا ما يهم هذا عمليًا لأن الخطط التي تمنح وصول Management API تمنحه عادةً عبر كل البيئات، لكن مرّر `?environment=live` صراحة إذا واجهت `401` غير متوقع عند حذف مفتاح بيئة live.
</Note>

<Warning>
  لا توجد حالة "تعطيل" أو "إيقاف مؤقت" — الإزالة فورية ودائمة. إذا كنت بحاجة فقط لإيقاف استخدام مفتاح مؤقتًا، لا تحذفه؛ أنشئ مفتاحًا جديدًا وتوقف عن استخدام القديم، أو نسّق مع التكامل الذي يستهلكه قبل حذفه.
</Warning>

## ذات صلة

* [نظرة عامة على Management API](/ar/api-reference/management-api/overview) — بنية المصادقة ذات المضيفين التي تنتمي إليها نقطة النهاية هذه.
* [إنشاء رمز API](/ar/api-reference/management-api/tokens/create) — أنشئ مفتاحًا بديلًا، واطّلع على قواعد السرد/الحصص التي تشترك فيها نقطة النهاية هذه.
* [إحصاءات الاستخدام](/ar/api-reference/management-api/tokens/usage-stats) — تحقق من استخدام مفتاح قبل تقرير إزالته.


## OpenAPI

````yaml api-reference/openapi/management-api.json DELETE /console/token/{key}/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    management.scanova.io (QR codes, folders, tags, leads, forms, analytics,
    plans, shared users & roles), plus the token-creation and usage-stats
    endpoints used to authenticate against it. Every path and request/response
    shape below was verified live against a real API key and the actual running
    backend (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://management.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /console/token/{key}/:
    delete:
      summary: Remove an API token
      operationId: removeApiToken
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Token removed
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. management.scanova.io) — the same key sent to
        the regular API host will not authenticate.

````