Automated Key Rotation: For security, your API key is automatically rotated every 7 days. You will receive an email warning 24 hours before rotation, and a confirmation email with your new key once rotated. Your old key remains valid for a 24-hour grace period after rotation.
Keep your API key secret. Anyone with your key has full access to your projects, keys, and source code. Never expose it in client-side code, public repositories, or Discord messages.
Include your API key as a Bearer token in the Authorization header of every request.
Always include a trailing slash at the end of your API endpoints (e.g., /projects/ instead of /projects) to ensure optimal performance and avoid redirect overhead.
import requestsAPI_KEY = "your-api-key-here"BASE_URL = "https://api.leaf7.fun"headers = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}# Note the trailing slash at the end of the URLresponse = requests.get(f"{BASE_URL}/api/vendor/projects/", headers=headers)print(response.json())