Understand your general resources
Organizational structure
Authorization header
{ "Authorization": "Bearer {access_token}" }Retrieve your Users
import requests
# Use your access token in the header.
headers = { "Authorization": f"Bearer {access_token}" }
# URL to retrieve a list of your users
url = "https://demo-api.certn.co/api/v1/users/"
# Send the HTTP request to the API via GET
response = requests.get(url, headers=headers)
############### Optional ###############
# Brings errors to the forefront
response.raise_for_status()
# Writes the contents of the response in a file named "user_list.json"
with open("user_list.json", "w") as f:
f.write(response.text)
############# End Optional #############Errors
Error codesLast updated
Was this helpful?
