# LeaderOS Developers - [Headless API (201 pages)](https://developer.leaderos.net/_llms/tr/headless-api.txt): Başlarken, Yapılandırma, Tema geliştirme, Yayınlama ve kaynaklar, API referansı. ## Plugin API ### Başlarken - [Plugin API Nedir?](https://developer.leaderos.net/plugin-api/tr/introduction.md): LeaderOS Plugin API'ye genel bakış: oyun sunucusu eklentileri, Discord botları ve kendi entegrasyonlarınız için sunucudan sunucuya API. - [Kurulum](https://developer.leaderos.net/plugin-api/tr/setup.md): Plugin API'yi yönetim panelinden etkinleştirin, API anahtarınızı alın ve ilk isteğinizi gönderin. ### Rehberler - [Kullanım Örnekleri](https://developer.leaderos.net/plugin-api/tr/usage.md): Plugin API'yi kendi eklentinizden, botunuzdan veya arka ucunuzdan çağırmak için örnekler. ### API referansı #### Auth - [Log in](https://developer.leaderos.net/plugin-api/tr/reference/auth/log-in.md): Checks the username and password and returns a session token. An existing valid session for the same IP and user agent is reused and extended. - [Register](https://developer.leaderos.net/plugin-api/tr/reference/auth/register.md): Creates an account and a session. Sends a verification e-mail when the e-mail verification module is on and an e-mail was given. - [Check a session token](https://developer.leaderos.net/plugin-api/tr/reference/auth/check-a-session-token.md): Returns success when the token belongs to a session that has not expired. - [Create a session for a user](https://developer.leaderos.net/plugin-api/tr/reference/auth/create-a-session-for-a-user.md): Creates a login token for a user without a password (for trusted integrations). Default lifetime is 30 days. - [Check a player's login state](https://developer.leaderos.net/plugin-api/tr/reference/auth/check-a-players-login-state.md): Used when a player joins the game server. `data.state` tells what the plugin should do: `REGISTER_REQUIRED`, `EMAIL_NOT_VERIFIED`, `LOGIN_REQUIRED`, `TFA_REQUIRED` or `HAS_SESSION`. - [Verify a 2FA code](https://developer.leaderos.net/plugin-api/tr/reference/auth/verify-a-2fa-code.md): Marks the session as two-factor verified. Returns success without checking when 2FA is not required for the session. #### Store - [Buy products with credits](https://developer.leaderos.net/plugin-api/tr/reference/store/buy-products-with-credits.md): Buys products for a user with their credit balance and delivers them (commands, roles, Discord roles). Applies discounts, subscription upgrades, required products / linked accounts, tax, stock and cashback like the website. - [Store tree for a player](https://developer.leaderos.net/plugin-api/tr/reference/store/store-tree-for-a-player.md): Active categories (nested in `subcategories`) with their products, final prices, discounts and upgrade info. Categories the player cannot see (category required products) are hidden. - [Top or latest donors](https://developer.leaderos.net/plugin-api/tr/reference/store/top-or-latest-donors.md) - [Community goal progress](https://developer.leaderos.net/plugin-api/tr/reference/store/community-goal-progress.md) - [List active products](https://developer.leaderos.net/plugin-api/tr/reference/store/list-active-products.md) - [Get a product](https://developer.leaderos.net/plugin-api/tr/reference/store/get-a-product.md): Returns `false` when the product does not exist or is inactive. - [List active categories](https://developer.leaderos.net/plugin-api/tr/reference/store/list-active-categories.md) - [Get a category](https://developer.leaderos.net/plugin-api/tr/reference/store/get-a-category.md): The category with its direct child categories and products. #### Credits - [Get a user's balance](https://developer.leaderos.net/plugin-api/tr/reference/credits/get-a-users-balance.md): Pass either `userID` or `username`. - [Add credits](https://developer.leaderos.net/plugin-api/tr/reference/credits/add-credits.md) - [Remove credits](https://developer.leaderos.net/plugin-api/tr/reference/credits/remove-credits.md) - [Set credits](https://developer.leaderos.net/plugin-api/tr/reference/credits/set-credits.md): Sets the balance to an exact amount (no credit history entry). - [Send credits between players](https://developer.leaderos.net/plugin-api/tr/reference/credits/send-credits-between-players.md): Transfers credits from one player to another (needs "can send credits" on in the credit module). #### Users - [Get a user](https://developer.leaderos.net/plugin-api/tr/reference/users/get-a-user.md): Pass either `userID` or `username`. Returns the account (without the password) and `linkedAccounts` (provider → identifier). - [A user's support tickets](https://developer.leaderos.net/plugin-api/tr/reference/users/a-users-support-tickets.md) - [A user's orders](https://developer.leaderos.net/plugin-api/tr/reference/users/a-users-orders.md) - [A user's roles](https://developer.leaderos.net/plugin-api/tr/reference/users/a-users-roles.md) - [Give a role](https://developer.leaderos.net/plugin-api/tr/reference/users/give-a-role.md) - [Remove a role](https://developer.leaderos.net/plugin-api/tr/reference/users/remove-a-role.md) - [Change a role](https://developer.leaderos.net/plugin-api/tr/reference/users/change-a-role.md): `id` is the user's current role ID; the body sets the new role and expiry date. #### Bazaar - [Items in a player's storage](https://developer.leaderos.net/plugin-api/tr/reference/bazaar/items-in-a-players-storage.md): Items that are in storage (not listed for sale and not sold). - [Add an item to storage](https://developer.leaderos.net/plugin-api/tr/reference/bazaar/add-an-item-to-storage.md) - [Take an item out of storage](https://developer.leaderos.net/plugin-api/tr/reference/bazaar/take-an-item-out-of-storage.md): Deletes an item that is in storage (for example when the player takes it back into the game). - [List bazaar servers](https://developer.leaderos.net/plugin-api/tr/reference/bazaar/list-bazaar-servers.md) #### Support - [List all tickets](https://developer.leaderos.net/plugin-api/tr/reference/support/list-all-tickets.md): Every ticket with its category name and messages. - [Open a ticket](https://developer.leaderos.net/plugin-api/tr/reference/support/open-a-ticket.md) - [Get a ticket](https://developer.leaderos.net/plugin-api/tr/reference/support/get-a-ticket.md): The ticket with its `category` and `messages`. - [Close a ticket](https://developer.leaderos.net/plugin-api/tr/reference/support/close-a-ticket.md) - [List a ticket's messages](https://developer.leaderos.net/plugin-api/tr/reference/support/list-a-tickets-messages.md) - [Reply to a ticket](https://developer.leaderos.net/plugin-api/tr/reference/support/reply-to-a-ticket.md): `isAdmin=true` writes the reply as staff (status becomes Answered). Without it, `userID` must be the ticket owner (status becomes User-Reply). - [Get a ticket message](https://developer.leaderos.net/plugin-api/tr/reference/support/get-a-ticket-message.md) - [List support categories](https://developer.leaderos.net/plugin-api/tr/reference/support/list-support-categories.md) - [Get a support category](https://developer.leaderos.net/plugin-api/tr/reference/support/get-a-support-category.md): Returns an array with zero or one category. - [List canned answers](https://developer.leaderos.net/plugin-api/tr/reference/support/list-canned-answers.md) - [Get a canned answer](https://developer.leaderos.net/plugin-api/tr/reference/support/get-a-canned-answer.md) #### Vote - [List voting links](https://developer.leaderos.net/plugin-api/tr/reference/vote/list-voting-links.md): With `username`, `?username=` is appended to every link. #### Discord - [Get a user by Discord ID](https://developer.leaderos.net/plugin-api/tr/reference/discord/get-a-user-by-discord-id.md): Finds the account linked to a Discord user and returns it with `roles` (expiry dates in UTC when the Discord bot module is on). - [Discord module settings](https://developer.leaderos.net/plugin-api/tr/reference/discord/discord-module-settings.md) - [Roles mapped to Discord roles](https://developer.leaderos.net/plugin-api/tr/reference/discord/roles-mapped-to-discord-roles.md) #### Integrations - [Verify a LeaderOS ID in-game code](https://developer.leaderos.net/plugin-api/tr/reference/integrations/verify-a-leaderos-id-in-game-code.md) - [Ask LeaderOS AI (in-game)](https://developer.leaderos.net/plugin-api/tr/reference/integrations/ask-leaderos-ai-in-game.md) - [Ask LeaderOS AI (Discord)](https://developer.leaderos.net/plugin-api/tr/reference/integrations/ask-leaderos-ai-discord.md) #### Command logs - [Pending commands of a server](https://developer.leaderos.net/plugin-api/tr/reference/command-logs/pending-commands-of-a-server.md): Command logs of the server that are not completed yet. `token` is the server token from Dashboard → Servers. - [Claim commands to run](https://developer.leaderos.net/plugin-api/tr/reference/command-logs/claim-commands-to-run.md): Called by the LeaderOS Connect plugin after it receives command IDs. Returns the commands that are still in `sending` state for this server and marks them `completed`. Run only the returned commands. - [Resend failed commands](https://developer.leaderos.net/plugin-api/tr/reference/command-logs/resend-failed-commands.md): Resends commands that failed or have been waiting for more than a minute (up to 60 retries each). Meant for scheduled jobs; you rarely need to call it yourself. ## OpenAPI Specs - [openapi](/headless/openapi.json) - [openapi](/plugin-api/openapi.yaml) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Turkish / Headless API (201 pages)](https://developer.leaderos.net/_llms/tr/headless-api.txt): Başlarken, Yapılandırma, Tema geliştirme, Yayınlama ve kaynaklar, API referansı. - [English (255 pages)](https://developer.leaderos.net/_llms/en.txt): Headless API, Plugin API. - [English / Headless API (201 pages)](https://developer.leaderos.net/_llms/en/headless-api.txt): Getting started, Configuration, Theme development, Deployment and resources, API reference. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.