Authenticate and choose scopes
Every API request uses a school-issued bearer credential. Browser cookies, passwords, and a school identifier are not API authentication.
Send the credential
Section titled “Send the credential”GET /api/v1/school HTTP/1.1Host: waqar.appAuthorization: Bearer <API_KEY>Accept: application/jsonUse TLS, send exactly one Authorization header, and keep the credential out
of URLs and bodies. Start with GET /school; its data.id confirms the tenant
attached to the key.
Read scopes
Section titled “Read scopes”| Scope | Permitted resource |
|---|---|
school:read | Authenticated school profile |
semesters:read | Semesters |
halqas:read | Halqas |
sheikhs:read | Eligible sheikhs |
students:read | Students |
sessions:read | Sessions |
attendance:read | Attendance |
recitations:read | Recitations |
learning_plans:read | Enabled Learning Plans and assignments |
students:sensitive:read is reserved and not assignable. Sensitive student
fields are not exposed by v1. Surah reference operations require a valid API
credential but no additional resource scope.
Write scopes
Section titled “Write scopes”| Scope | Permitted resource |
|---|---|
students:write | Supported student create/update operations |
sessions:write | Supported session create/update/end operations |
attendance:write | Attendance batch upsert |
recitations:write | Recitation creation |
A write scope on a key is necessary but not sufficient. The school must also have effective write capability, rollout eligibility, and an allowed current scope policy. Read eligibility never implies write eligibility.
Apply least privilege
Section titled “Apply least privilege”- List the integration’s exact operations.
- Map each operation to the endpoint reference’s required scope.
- Create separate keys for unrelated systems and environments.
- Exclude future or “just in case” scopes.
- Replace the key if scopes need to change.
- Periodically remove unused keys and scopes through rotation.
Interpret authorization failures
Section titled “Interpret authorization failures”401 invalid_api_key: credential missing, malformed, unknown, expired, or revoked.403 insufficient_scope: the effective or key scope does not allow the operation; useerror.details.required_scopefor diagnosis.- Other
403errors can reflect suspension, rollout, feature, network, or write-policy controls.
Never retry a 401 or 403 indefinitely. Correct the credential or obtain an
authorized policy change. See endpoint reference.