How to get "Authorization: Bearer $SENSU_TOKEN"?

Hi @masifpak,

If you just need to manually query the API, you could export your user access token to your environment variables and use that as the bearer token; keep in mind that this access token is valid for a maximum of 5 minutes so you might need to refresh it often. Here’s how you could use it:

$ eval $(sensuctl env)
$ curl -H "Authorization: Bearer $SENSU_ACCESS_TOKEN" http://127.0.0.1:8080/api/[...]

Alternatively, you could create and use an API key to authenticate against the API if you need long-lived tokens: https://docs.sensu.io/sensu-go/5.15/reference/apikeys/.