https://discord.gg/botpress logo
Need Help: Accessing Botpress Tables API via Pytho...
# šŸ¤help
w
I’m building a bot that stores user data in a Botpress table and want to fetch it via Python to create a dashboard. I’m using the Tables API but can’t connect to the bot or its tables. **Auth**: Should the API key include bp_pat_ or just the suffix? URL: What’s the correct base URL for hosted/cloud instances? Example of my failing request:
Copy code
import requests
import json


BOT_ID = BOT_ID
WORKSAPCE_ID =WORKSAPCE_ID  
TOKEN = TOKEN


url = "https://api.botpress.cloud/v1/tables"

print("URL:", url)

# Headers para autenticación
headers = {
    "Authorization": f"bearer {TOKEN}",
    "Bot-Id": BOT_ID,
    "Content-Type": "application/json"
}


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


print("Response Status Code:", response.status_code) #Response Status Code: 400
2 Views