Skip to main content

Auth API

The Auth API issues OAuth2 access tokens using the client credentials grant. Obtain a token here first, then pass it as Authorization: Bearer <token> on every subsequent request. See the Developer getting-started guide for full setup instructions.

Base prefix: https://api.alpha-1edtech.ai/auth/1.0


POST /auth/1.0/token

Exchange client credentials for an OAuth2 access token.

Supports two authentication methods:

  • HTTP Basic Auth: Send Authorization: Basic <base64(client_id:client_secret)> header
  • Request body: Send client_id and client_secret as JSON or application/x-www-form-urlencoded

The returned token should be included as a Bearer token in subsequent API requests.

Scope: None — this endpoint is how you obtain a token.

Request body

Content-Type: application/json or application/x-www-form-urlencoded

FieldTypeRequiredDescription
client_idstringyes (if not using Basic Auth)OAuth2 client identifier
client_secretstringyes (if not using Basic Auth)OAuth2 client secret
scopestringnoSpace-separated list of requested scopes

Response

200 OK — Token issued:

FieldTypeDescription
access_tokenstringJWT access token
token_typestringToken type (always "Bearer")
expires_inintegerToken lifetime in seconds

401 Unauthorized — Invalid credentials: { "error": "..." }

429 Too Many Requests — Rate limit exceeded.

Example

curl -X POST https://api.alpha-1edtech.ai/auth/1.0/token \
-H "Content-Type: application/json" \
-d '{
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"scope": "roster.readonly events.write"
}'

Response:

{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600
}