Automation_Threads_EU / list_secrets.py
FincH12's picture
Deploy Dynamic Dashboard, Analytics and Prompts Editor
fd40f81 verified
Raw History Blame Contribute Delete
415 Bytes
import requests
from huggingface_hub import get_token
token = get_token()
headers = {"Authorization": f"Bearer {token}"}
url = "https://huggingface.co/api/spaces/FincH12/Automation_Threads/secrets"
resp = requests.get(url, headers=headers)
if resp.status_code == 200:
for s in resp.json():
print(f"Found secret: {s['name']}")
else:
print(f"Failed to fetch secrets: {resp.status_code} {resp.text}")