The API returns only what that user is allowed to see — project and document
roles apply to API calls exactly as they do in the app.
Getting a token
Create an app in My apps, then sign people in with the OAuth 2.0 authorization code flow with PKCE: Sign in with Ed Controls describes the endpoints, scopes and refresh. The quickstart walks through it withcurl.
Token lifetime
The access token is a JWT with anexpires_in. Cache it and reuse it across
calls — don’t request a new one per API call. Refresh it before it expires, or
when a call returns 401. A 503 is different: the API could not reach the
service that validates tokens, so retry the call with backoff and keep the
token.
Use a service account
Because the token inherits the user’s permissions, we strongly recommend creating a dedicated Ed Controls user per integration (for exampleapi-erp-sync@yourcompany.com) instead of using someone’s personal account:
- Permissions are explicit: give the service account exactly the project roles the integration needs, nothing more.
- The integration doesn’t break when an employee leaves or changes their password.
- Actions performed by the integration are clearly attributable in timelines and audit trails.
Password grant (existing integrations)
Integrations that were set up before My apps may have credentials we issued by hand. Those use the OAuth 2.0 password grant against the API’s own token endpoint, and keep working. New integrations use an app from My apps instead; the password grant is not available to those apps.Getting a token
POST https://web.edcontrols.com/api/v1/oauth/token with a form-encoded body:
access_token is an opaque string — pass it verbatim as your Bearer
token. The response carries no expires_in field.
Token lifetime
Cache the token and reuse it across calls — don’t request a new one per API call. When a call returns401, get a new token — either by refreshing (below)
or by re-running the password grant above.
Refreshing a token
The token response includes arefresh_token. Exchange it for a new
access_token without re-sending the user’s credentials:
