Zrzur المطوّرون

المصادقة

أي رمز يذهب إلى أين. لإنشاء رمز، انظر التطبيقات والرموز. ولحمايته، انظر حماية الرموز.

رموز البوتات

لكل تطبيق رمز بوت واحد. أرسله في الترويسة x-bot-token مع كل طلب REST:

curl https://api.zrzur.com/users/@me -H "x-bot-token: YOUR_BOT_TOKEN"

تأخذ البوابة الرمز نفسه، إما في رسالتها الأولى (Authenticate) أو في العنوان ?token=. انظر البوابة.

أي ترويسة تفعل ماذا

الترويسةمن يستخدمهامقبولة في
x-bot-tokenالبوتاتكل نقطة نهاية موسومة «رمز البوت» في هذا المرجع
x-session-tokenالأشخاص عبر التطبيقكل شيء، بما في ذلك إعدادات الحساب
لا شيءأي أحدنقاط النهاية العامة، وردود التفاعلات (الرمز في المسار)، وتنفيذ الويب هوك (الرمز في المسار)

إذا أُرسل رمز بوت ورمز جلسة معًا يُستخدم رمز البوت. والرمز المفقود أو الخاطئ أو العائد إلى بوت معلّق يحصل على 401 بنوع الخطأ InvalidSession.

رموز التفاعلات والويب هوك

البوتات ومالكوها

ينشئ المالك البوت ويعدله ويعيد تعيين رمزه ويحذفه في بوابة المطورين بحسابه الخاص. لا يدير رمز البوت التطبيقات. وحذف البوت لا رجعة فيه، لذلك يؤكده المالك مجددًا بكلمة المرور أو رمز المصادقة أو رمز الاسترداد.

DELETE /bots/{bot_id}

Delete Bot. Delete a bot by its id. Requires a validated MFA ticket (X-MFA-Ticket) created by the bot owner with their password, authenticator code or recovery code.

غير متاح للبوتات.

حد المعدل: bots, 10 / 10 s

GET /bots/{bot_id}

Fetch Bot. Fetch details of a bot you own by its id. A bot may fetch itself (with its own id) to read its settings, such as the privileged intents its owner switched on.

حد المعدل: bots, 10 / 10 s

PATCH /bots/{bot_id}

Edit Bot. Edit bot details by its id.

غير متاح للبوتات.

حد المعدل: bots, 10 / 10 s

POST /bots/{bot_id}/token/reset

Reset Bot Token. Makes a new token for the bot; the old one stops working at once and the bot is signed out everywhere. The new token is in this response only: Zrzur keeps just a hash and can't show it again. Requires a validated MFA ticket (X-MFA-Ticket) created by the bot owner with their password, authenticator code or recovery code.

حد المعدل: bots, 10 / 10 s

GET /bots/{target}/commands

Fetch Public Bot Commands. The global commands a bot registered, for its page in Discover and its profile, and for the command list in a DM with it. Works for public bots, for the owner, and for anyone who has a DM with the bot. Commands limited to one server are never listed here. A public bot's list is cached for a minute; registering or changing a command through the API shows at once.

حد المعدل: bots, 10 / 10 s

DELETE /bots/{target}/interactions/endpoint

Remove Interactions Endpoint. Interactions go back to the gateway.

غير متاح للبوتات.

حد المعدل: bots, 10 / 10 s

PUT /bots/{target}/interactions/endpoint

Set Interactions Endpoint. Interactions go to this HTTPS address from now on, instead of the gateway. Make a signing secret first. The address gets two requests before it is saved: one with a wrong signature, which it must refuse, and a signed Ping, which it must answer with {"type":"Pong"}, in either order. Requires a validated MFA ticket (X-MFA-Ticket) created by the bot owner: this address receives what people enter into the bot.

غير متاح للبوتات.

حد المعدل: bots, 10 / 10 s

POST /bots/{target}/interactions/secret

New Interactions Signing Secret. Makes the secret your server uses to check X-Zrzur-Signature; the previous one stops working at once. It is in this response only. Requires a validated MFA ticket (X-MFA-Ticket) created by the bot owner.

غير متاح للبوتات.

حد المعدل: bots, 10 / 10 s

GET /bots/{target}/invite

Fetch Public Bot. Fetch details of a public (or owned) bot by its id: its profile, the permissions it asks for, whether it is verified, how many servers it is in and, if its owner chose to show it, who made it.

حد المعدل: bots, 10 / 10 s

POST /bots/{target}/invite

Invite Bot. Invite a bot to a server or group by its id.`

غير متاح للبوتات.

الصلاحيات: Channel:InviteOthers · حد المعدل: bots, 10 / 10 s

GET /bots/{target}/verification

Bot verification state. Whether the bot is verified and the latest request. Owner only.

حد المعدل: bots, 10 / 10 s

POST /bots/{target}/verification

Apply for verification. Ask Zrzur to verify your bot, and to approve the privileged intents it needs past 100 servers. Links to its privacy policy and terms are required, https only, and also go on the bot. One open request at a time; after a denial you can apply again a week later.

غير متاح للبوتات.

حد المعدل: bots, 10 / 10 s

GET /bots/@me

Fetch Owned Bots. Fetch all of the bots that you have control over.

غير متاح للبوتات.

حد المعدل: bots, 10 / 10 s

POST /bots/create

Create Bot. Create a new bot.

غير متاح للبوتات.

حد المعدل: bots, 10 / 10 s

OAuth2

تسجيل دخول الأشخاص إلى موقعك وروابط التثبيت في صفحة OAuth2.