https://app.stammer.ai/en/chatbot/api/v1/chatbot/your_chatbot_uuid/
Content-Type: application/json
Authorization: Token <Your-API-Token>
import requests
# Define the API endpoint
url = "https://app.stammer.ai/en/chatbot/api/v1/chatbot/your_chatbot_uuid/"
# Set up authentication and headers
headers = {
'Authorization': 'Token <YOUR-API-TOKEN>',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.get(url, headers=headers)
# Process the response
if response.status_code in (200, 201, 202):
result = response.json()
print("Response data:", result)
else:
try:
error_data = response.json()
error_message = error_data.get('message') or error_data.get('error', 'Unknown error')
print(f"Error: {error_message}")
except ValueError:
print(f"Error: Status code {response.status_code}")