|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: LifeBots API Setup |
| 4 | +author: missyrestless |
| 5 | +date: 2026-03-26 09:12 -0700 |
| 6 | +--- |
| 7 | + |
| 8 | +`BotControl` command line and the `LifeBots Control Panel` in-world object use the `LifeBots` |
| 9 | +Application Programming Interface (API) to control your `LifeBots` bots. In order to use the API, |
| 10 | +an API Key and Bot Secret are required. Your `LifeBots` API Key can be found at |
| 11 | +[https://lifebots.cloud/developer](https://lifebots.cloud/developer). |
| 12 | + |
| 13 | +You will need to generate a Bot Secret for each of your `LifeBots` bots. See the `LifeBots` Knowledge Base |
| 14 | +article [How to Setup a Bot Access Secret](https://lifebots.cloud/support/article/how-to-setup-a-bot-access-secret) |
| 15 | +for detailed steps to generate your Bot Secret(s). |
| 16 | + |
| 17 | +## Step-by-Step API Setup |
| 18 | + |
| 19 | +1. Create a LifeBots Developer API Key |
| 20 | + - Visit [https://lifebots.cloud/developer](https://lifebots.cloud/developer) to create your API Key |
| 21 | + - Copy the key and store it securely |
| 22 | +1. Create a Bot Access Secret for each LifeBots bot you wish to control |
| 23 | + - How to Setup a Bot Access Secret |
| 24 | + - These steps are detailed in the LifeBots Knowledge Base article at [https://lifebots.cloud/support/article/how-to-setup-a-bot-access-secret](https://lifebots.cloud/support/article/how-to-setup-a-bot-access-secret) |
| 25 | + - A Bot Access Secret is required for LifeBots API authentication |
| 26 | + - Requests must be authenticated using an access secret unique to each bot |
| 27 | + - To create an access secret for a bot: |
| 28 | + - Visit your LifeBots Dashboard at [https://lifebots.cloud/dashboard](https://lifebots.cloud/dashboard) |
| 29 | + - Click on the bot you wish to control via the API |
| 30 | + - This will open a Manage Bot panel for the bot |
| 31 | + - Click on the API Details pane |
| 32 | + - This will open an API Access Configuration window |
| 33 | + - Click on the Generate Secure Code button |
| 34 | + - This will generate a Bot Access Secret unique to this bot |
| 35 | + |
| 36 | +After generating the Bot Access Secret, in the API Access Configuration window you will see a Current Access Code with the date it was created. Below that is your Bot Access Secret. Click on the eye icon to the right of the access secret to reveal the secret. This will enable the Copy icon to the right of the eye icon. |
| 37 | + |
| 38 | +Click on the Copy icon to copy the bot access secret to your clipboard. Paste the copied secret into a file and store it securely. Never share this secret with anyone. |
| 39 | + |
| 40 | +Repeat this process to generate a unique Bot Access Secret for each of the bots you wish to control. |
| 41 | + |
| 42 | + - Anyone with your access secret can control your bot using the API |
| 43 | + - Store this secret securely and change it regularly |
| 44 | + - If compromised, create a new access secret immediately |
| 45 | + |
| 46 | +## BotControl Configuration |
| 47 | + |
| 48 | +Configure the `BotControl` command line bot control system by adding and editing the file `${HOME}/.botctrl`. |
| 49 | + |
| 50 | +If you wish to control `LifeBots` bots then you must configure your `LifeBots` |
| 51 | +developer API key and bot secrets for the `LifeBots` bots you wish to control. |
| 52 | + |
| 53 | +The following example entries in `$HOME/.botctrl` will allow you to control a |
| 54 | +`LifeBots` bot named "Your Botname": |
| 55 | + |
| 56 | +```sh |
| 57 | +# LifeBots Developer API Key |
| 58 | +export LB_API_KEY='<your-lifebots-api-key>' |
| 59 | +# LifeBots bot secret |
| 60 | +export LB_SECRET_Your_Botname='<your-bot-secret>' |
| 61 | +``` |
| 62 | + |
| 63 | +Add an entry of the form `export LB_SECRET_Firstname_Lastname='<bot-secret>'` |
| 64 | +to `$HOME/.botctrl` for each of your `LifeBots` bots. |
| 65 | + |
| 66 | +## LifeBots Control Panel Setup |
| 67 | + |
| 68 | +Configure the `LifeBots Control Panel` in-world object by editing the `Configuration` notecard: |
| 69 | + |
| 70 | +- Edit the LifeBots Control Panel "Configuration" notecard |
| 71 | + - Right click the LifeBots Control Panel and select Edit |
| 72 | +- In the Contents tab of the Edit window |
| 73 | + - Right click the Configuration notecard and select Open |
| 74 | +- Change the line LB_API_KEY = 'your-api-key' replacing 'your-api-key' with your LifeBots API Key |
| 75 | +- Save the modified Configuration notecard and close the Edit window |
| 76 | +- Your command and control script will pass the Bot Access Secret to the LifeBots Control Panel |
0 commit comments