I am running this from my addon run.sh file:
response=$(curl -ILs -X GET -H "Authorization: Bearer ${SUPERVISOR_TOKEN}" -H "Content-Type: application/json" http://supervisor/core/info)
http_code=$(tail -n1 <<< "$response") # get the last line
content=$(sed '$ d' <<< "$response") # get all but the last line which contains the status code
The result I get is this:
HTTP/1.1 403 Forbidden
Content-Type: text/plain; charset=utf-8
Content-Length: 14
Date: Sun, 04 May 2025 10:51:02 GMT
Server: Python/3.13 aiohttp/3.11.18
I have set homeassistant_api: true in my config.yaml file