EduCare
Getting Started

Authentication

Learn how to authenticate your API requests to the EduCare API

Authentication

The EduCare API uses Bearer Token authentication for all endpoints except the health check. You'll need to include your API key in the Authorization header of every request.

Getting Your API Key

  1. Create an Account: Visit dashboard.educare.com and create a developer account.
  2. Generate API Key: Navigate to Settings → API Keys and click "Generate New Key".
  3. Store Securely: Copy your API key and store it securely. You won't be able to see it again!

⚠️ Security Best Practice: Never expose your API key in client-side code or public repositories. Always use environment variables.

Using Your API Key

Include your API key in the Authorization header with the Bearer prefix:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.educare.com/v1/students
fetch('https://api.educare.com/v1/students', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
})
  .then(res => res.json())
  .then(data => console.log(data));
import requests

response = requests.get(
    'https://api.educare.com/v1/students',
    headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
print(response.json())
<?php
$ch = curl_init('https://api.educare.com/v1/students');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_KEY'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>

Authentication Errors

If your API key is invalid or missing, you'll receive a 401 Unauthorized response:

{
  "error": "Invalid API key",
  "code": "UNAUTHORIZED",
  "status": 401
}

Common Issues

IssueSolution
Missing Bearer prefixEnsure the header is Bearer YOUR_API_KEY (with space)
Expired keyGenerate a new key from the dashboard
Wrong environmentCheck if using production vs. sandbox key
Key revokedContact support if you believe this is an error

API Key Scopes

ScopeAccess Level
read:studentsRead student data
write:studentsCreate/update students
read:teachersRead teacher data
write:teachersCreate/update teachers
read:classesRead class data
write:classesCreate/update classes
adminFull access to all resources

Note: Standard API keys include all scopes. Contact support for restricted scope keys.

On this page