Linework Developers
AR
احصل على الوصول

المفاهيم

نطاقات الصلاحية (Scopes)

تحدد نطاقات الصلاحية ما يمكن للمفتاح فعله. اخترها عند إنشاء المفتاح، وامنح كل مفتاح ما يحتاجه فقط.

يفشل أي طلب إلى نقطة نهاية لا يملك المفتاح نطاق الصلاحية الخاص بها، مع الخطأ 403 INSUFFICIENT_SCOPE. لا يمكن إضافة نطاقات صلاحية إلى مفتاح موجود: أنشئ مفتاحًا جديدًا وألغِ القديم.

غير متاح: المدفوعات، والمحفظة، والرموز (tokens)، والتحويلات، وإعدادات الحساب. لا يمنح أي نطاق صلاحية الوصول إليها.

كل نطاقات الصلاحية#

نطاق الصلاحيةيسمح بـ
profile:readقراءة ملفك الشخصي والملفات الشخصية العامة للمستخدمين الآخرين.
posts:readقراءة المنشورات (منشوراتك وتلك التي يمكنك رؤيتها في التطبيق) وتعليقاتها.
posts:writeرفع الوسائط، ونشر منشوراتك وتعديلها وحذفها.
comments:writeكتابة التعليقات وحذف تعليقاتك (أو التعليقات على منشوراتك).
likes:writeالإعجاب بالمنشورات وإلغاء الإعجاب.
follows:writeمتابعة المستخدمين وإلغاء متابعتهم.
stories:writeنشر القصص.
store:readقراءة متجرك على Bloop ومنتجاته.
store:writeتعديل متجرك، وإنشاء المنتجات وتحديثها وحذفها، وتحديث المخزون.
orders:readقراءة الطلبات التي يستلمها متجرك.
orders:writeتحديد الطلبات كمشحونة.
chat:readقراءة محادثاتك ورسائلها.
chat:writeإرسال الرسائل (مع قاعدة مكافحة الرسائل المزعجة).

نقاط النهاية حسب نطاق الصلاحية#

كل المسارات نسبية إلى https://api.linework.app/open/v1.

نقطة النهاية (endpoint)نطاق الصلاحية
GET /meprofile:read
GET /users/{id}profile:read
GET /users/by-username/{username}profile:read
GET /me/postsposts:read
GET /users/{id}/postsposts:read
GET /posts/{id}posts:read
GET /posts/{id}/commentsposts:read
POST /mediaposts:write أو stories:write أو store:write
POST /postsposts:write
PATCH /posts/{id}posts:write
DELETE /posts/{id}posts:write
POST /posts/{id}/commentscomments:write
DELETE /comments/{id}comments:write
POST DELETE /posts/{id}/likelikes:write
POST DELETE /users/{id}/followfollows:write
POST /storiesstories:write
GET /storestore:read
POST PATCH /storestore:write
GET /store/productsstore:read
POST /store/productsstore:write
PATCH DELETE /store/products/{id}store:write
PATCH /store/products/{id}/stockstore:write
GET /store/ordersorders:read
GET /store/orders/{id}orders:read
POST /store/orders/{id}/shiporders:write
GET /conversationschat:read
GET /conversations/{id}/messageschat:read
POST /conversations/{id}/messageschat:write
POST /messageschat:write

مرجع API هو المصدر المعتمد: تذكر كل عملية نطاق الصلاحية المطلوب لها.

مجموعات مقترحة#

التكاملنطاقات الصلاحية
روبوت نشرprofile:read posts:read posts:write stories:write
مدير المجتمعposts:read comments:write likes:write
مزامنة المتجرstore:read store:write orders:read orders:write
روبوت دردشة للدعمchat:read chat:write (+ orders:read للبحث عن الطلبات)