# Initialising TotalControl

TotalControl for Bots has to know the Bot name you are going to use.

## Sending [`BOT_SETUP_SETBOT`](/doc/bot_setup_setbot-ojcvi28wUW) command

```csharp
llMessageLinked(LINK_SET,BOT_SETUP_SETBOT,"My bot name","ACCESS CODE or TOKEN"); 
```

(yes, the above example is correct: you can pass a string value instead of a key)

### Access Code or API Token

To protect your bot from abusive scripters, you have to pass the bot access code or API token while initializing - ([read more about access codes and API tokens](http://www.mysmartbots.com/docs/Bot_access_code)).

## Determining Success

TotalControl for Bots will raise the event after [`BOT_SETUP_SETBOT`](/doc/bot_setup_setbot-ojcvi28wUW)

* [`BOT_SETUP_SUCCESS`](/doc/bot_setup_success-QLVy1LhVJN) indicates that this bot can be used now,
* [`BOT_SETUP_FAILED`](/doc/bot_setup_failed-yy58DIzSt3) indicates that there were an error setting the bot. See [TotalControl Status Codes](/doc/status-codes-9d5c3yremD) for details.