#We have built a dashboard to monitor

1 messages · Page 1 of 1 (latest)

blissful current
#

This is the code I am using.

import os
import requests

url = "http://supervisor/core/info" # Replace with the desired API endpoint
token = os.environ.get("SUPERVISOR_TOKEN")
headers = {"Authorization": f"Bearer {token}"}

response = requests.get(url, headers=headers)

if response.status_code == 200:
data = response.json()
# Process the data as needed
else:
print(f"Request failed with status code {response.status_code}")

Request failed with status code 403

ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /core/info

blissful current
#

OK I need to run the Remote API proxy and get the token and now I am in.