API Credentials for Home Assistant
Guide to obtaining tokens, keys, and connections.
To connect your Home Assistant to Botize, you need three pieces of information: a public URL for your installation, the port (optional), and a long-lived access token. Below we explain step by step how to obtain them. If you cannot expose your public IP address at home, we recommend using Nabu Casa (Home Assistant Cloud) to get a URL accessible from the internet without opening ports on your router.
Recommended option: get a public URL with Nabu Casa
-
1
Nabu Casa (Home Assistant Cloud) is the official service maintained by the creators of Home Assistant. It provides a public HTTPS URL for your installation without exposing your IP address or opening ports. It is the ideal option if your home network is behind a router you cannot configure. It requires a subscription (check the current pricing at https://www.nabucasa.com/pricing).
-
2
If you do not yet have a Home Assistant Cloud account, create one from your Home Assistant under 'Settings' > 'Home Assistant Cloud' and follow the signup process. You will need to verify your email address.
-
3
Once your account is active, go back to 'Settings' > 'Home Assistant Cloud'.
-
4
In the 'Remote Control' section, enable the switch. The first time, it may take up to one minute to prepare the certificate.
-
5
You will see a URL such as 'https://xxxxx.ui.nabu.casa'. Copy it: this will be the value for the 'Home Assistant Public IP or URL' field in Botize.
-
6
When using Nabu Casa, the 'Port' field in Botize should be left empty (the URL already uses standard HTTPS).
Alternative: use your public IP or your own URL
-
1
If you prefer not to use Nabu Casa, your Home Assistant must be reachable from the internet. This means having a public IP address (or a domain with dynamic DNS) and configuring port forwarding on your router to the machine running Home Assistant. Keep in mind that exposing your installation directly requires proper security measures (HTTPS, strong passwords, and ideally a reverse proxy).
-
2
Check which port your Home Assistant is listening on. By default it is 8123. You can view or change it in the configuration of the 'http' integration (https://www.home-assistant.io/integrations/http).
-
3
In the 'Home Assistant Public IP or URL' field in Botize, enter your public IP address or domain (for example 'http://my-domain.com' or 'https://my-domain.com'). Do not include the port here.
-
4
In the 'Port' field in Botize, enter the port through which your Home Assistant is accessible from the internet (default is 8123). If your URL already points to the standard ports (80 or 443) through a reverse proxy, leave this field empty.
Get the long-lived access token
-
1
Access your Home Assistant from a browser using your usual user account.
-
2
Click your username (bottom-left corner) or go directly to the '/profile' URL of your installation (for example 'https://xxxxx.ui.nabu.casa/profile').
-
3
Inside your profile, go to the 'Security' tab (in recent versions) or scroll to the bottom of the page.
-
4
Locate the 'Long-Lived Access Tokens' section and click the 'Create Token' button.
-
5
Assign a descriptive name, for example 'Botize', and confirm.
-
6
Home Assistant will display the token ONLY ONCE. Copy the entire token and store it in a safe place: if you close the dialog without copying it, you will not be able to see it again and will need to generate a new one. The token is valid for 10 years.
Connect your account in Botize
-
1
In the 'Home Assistant Public IP or URL' field, paste the URL you obtained (either from Nabu Casa or your public IP/domain).
-
2
In the 'Port' field, enter the port if needed (default is 8123 for local IP access). Leave it empty if you are using Nabu Casa or if your URL already points to ports 80/443 through a reverse proxy.
-
3
In the 'Token' field, paste the long-lived token you generated in the previous step.
-
4
Click 'Authorize' to complete the connection. Botize will make a test request to your Home Assistant; if the details are correct, the account will be linked successfully.