Hello @Ook! For now, the Gladys 4 REST API is more for « internal » use within Gladys. There is not yet a long-term token mechanism to use the API externally (with an API key).
This is, however, a planned development, which is listed here:
You can vote for the feature if you want to see it in Gladys ![]()
Out of curiosity, why would you like to use the API externally?
In the meantime, two possibilities
1) The MQTT API
If you want to send new device values, you can use the Gladys MQTT API (more explanations in the documentation), which is the cleanest option, in my opinion ![]()
2) Use a « user » token as if you were the frontend
If you really want to use the API in a script before API tokens are available, you can use the login flow in your script to retrieve an access_token and a refresh_token, then call the Gladys API with an access_token in the « Authorization » header.
It’s less clean than using future API keys, but it gets the job done in the meantime ![]()