# Link Players

The goal

To run correctly, the bot needs to know which discord users own each CoC account of your clan. This will for example allow it to give the member access to specific channel or ping them automatically with [Reminders](/server-setups/reminders.md)you set.

## The command

For this, you need to run the `/link` command

{% hint style="info" %}
If you link someone by mistake, you can use the [Unlink Players](/clan-setups/link-players/unlink-players.md) command.
{% endhint %}

## The parameters

### Required

`player` : This corresponds to the tag of the player you want to linked. You can find this tag in their profile in game. It should look like that : #PVJ98GL.

### Optional

`user`: This is the discord user you want to link the CoC account with. If you run the command for yourself, you do not need to use this option. It is useful only if you want to link an account to someone else.

`api_token` : This is to prove that the account is yours. You can find this in the parameters of Clash Of Clans.&#x20;

{% hint style="warning" %}
The API token is required only if set by the clan staff (see [Setup a server](/server-setups/setup-a-server.md)), or if the account is already linked to someone else.
{% endhint %}

`greet`: This is to send a greeting message to the user once linked.

<figure><img src="/files/KnTyWG73argHY0MN5N3p" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clashk.ing/clan-setups/link-players.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
