Create a token in Home Assistant under your profile -> Security -> Long-lived access tokens. It is stored in this browser only. Anything that can run scripts on this page can read it, so use a token you can revoke.