import requests
# The URL for the library endpoint
url = 'https://api.knowbase.ai/api/v1/library'
# Replace 'your_access_token_here' with the actual access token you received from the API
headers = {
'access-token': 'your_access_token_here'
}
# Make the GET request to retrieve the library files details
response = requests.get(url, headers=headers)
# Check the response
if response.status_code == 200:
print("Successfully retrieved the list of files.")
print(response.json()) # This will print the list of files with their details
else:
print("Failed to retrieve the list of files.")
print(response.json()) # This will print the error message