How to get long lived access token?

Hello. I am new in HA. I need to get long lived access token for edit config files with Visual Studio Code Config Helper.

I see that topic in manual but I dont understand how to use it. I try send POST json to http://hassio.local:8123/auth/long_lived_access_token and it just say 404 page not found.

Help me please understand how to get those tokens/

Go under your profile than logged in, there you can find at the end of the page the option to create long life access tokens.


How can I obtain the token through the API when establishing the web socket connection for the firs time? How can we establish a web socket using the username and password, then secondly obtaining the token?

For those who are having trouble finding it, you get to your Profile page on Home Assistant by clicking on your username in the bottom left panel of the HA page (under Notifications)


Then click on Create Token all the way at the bottom:

Give it a meaningful name and then copy it for use in your application.



Make sure you save it because it won’t be displayed again.


Thank you. This helped me.

1 Like