> For the complete documentation index, see [llms.txt](https://fragmentdevelopment.gitbook.io/fivem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fragmentdevelopment.gitbook.io/fivem/paid-scripts/api/adding-permissions.md). Agents can also search and read this documentation through its [MCP server](https://fragmentdevelopment.gitbook.io/fivem/~gitbook/mcp).

# Adding Permissions

Permission are added in CS API TS, so go right there!

### Enabling Developer Mode

First off, you'll need to enable the developer mode to be able to get identifiers.

1. Go to the Settings window in Discord, Look for the **Advanced tab** and enable **Developer Mode.**

### Whitelisting Servers / Channels

This is used if you only want the bot to receive actions from certain servers or channels.

To whitelist a server or channel, just right-click on it and copy its ID, then add it into its corresponding variable in the Config file.

Don't forget that you must enable **useAllowedServersWhitelist** if you'll use Servers Whitelist or **useAllowedChannelsWhitelist** if you'll use Channels Whitelist.

### Giving Permissions to an user

You can give permissions to an user to perform an action by his user ID or by a role

To get an user identifier or a role identifier you just have to right-click above and click "Copy user ID" or "Copy role ID", then paste it into the action you want to give permission to in the Config file.

There's also a "All" category that every identifier there will have access to **every** action.
