Authmarks API authentication for Indian colleges and universities: organisation tokens and scopes
How Authmarks organisation API tokens work for university IT cells: the amk_ format, scopes and the plan features they depend on, expiry, rotation, revocation, secure storage and the steps to take if a token leaks.
Published 2026-11-26 · 5 min read
| Auth | Bearer token (Authorization header) |
|---|---|
| Token format | amk_ followed by 43 base64url characters |
| Storage | SHA-256 hash only; shown once |
| Live tokens | Up to 20 per organisation |
| Expiry | Optional, 1 to 730 days |
| Who manages tokens | Organisation owners and admins |
What this guide covers: all you need to issue, scope, store, rotate and revoke the tokens that call Authmarks. A single type of credential, the organisation API token, is used by the REST API, the MCP server, and SCIM provisioning and the audit stream. Every token belongs to one organisation and carries only the scopes you select. In most Indian institutions these tokens are managed by the university IT cell or the LMS administrator, not by individual faculty.
How tokens work
| Property | Details |
|---|---|
| Format | amk_ followed by 43 base64url characters (32 random bytes). |
| Displayed | Only once, at creation or rotation. Copy it at that moment. |
| Stored | Only as a SHA-256 hash, along with the first 12 characters so admins can distinguish tokens. Authmarks cannot display a token a second time. |
| Organisation | Each token belongs to a single organisation. Sent with another organisation's id, it returns 401, just like an unknown token. |
| Scopes | Set when the token is created. To change them, create a new token and revoke the old one. |
| Live tokens | A maximum of 20 live (not revoked, not expired) tokens per organisation. |
| Expiry | Optional, 1 to 730 days. Without an expiry, the token remains valid until revoked. |
| Last used | The Developers tab shows the last time each token was used. |
| Who | Owners and admins create, rotate and revoke tokens. Authmarks support cannot create or rotate tokens, not even during a support session. |
| Audit | Each creation, rotation and revocation is written to the organisation's admin audit log before it takes place. Neither the token nor its hash is ever logged. |
Pass the token as a bearer token with each request:
curl -sS "https://www.authmarks.com/api/v1/orgs/$AUTHMARKS_ORG/assignments" \
-H "Authorization: Bearer $AUTHMARKS_TOKEN"
Do not place a token in a URL query string. URLs are recorded in logs, browser history and referrer headers.
Scopes
| Scope | What it permits | Plan feature required |
|---|---|---|
assignments_read | GET /assignments (REST) and list_assignments (MCP). | None |
records_read | GET /assignments/{id}/submissions and GET /records/{id} (REST); list_submissions and get_record (MCP). | None |
lms_read | GET /lms-connections and GET /lms-connections/{id}/grade-returns (REST); list_lms_connections and list_grade_returns (MCP). | LTI |
scim_users | SCIM 2.0 Users plus the discovery endpoints. Creates, updates and deactivates members. | SCIM |
scim_groups | SCIM 2.0 Groups: moves people among the member, instructor and admin groups. | SCIM |
audit_stream | GET /api/orgs/{orgId}/audit-stream, the NDJSON pull of the audit log for your SIEM. | SIEM streaming |
Points to note:
- The three
_readscopes and the REST API v1 are read-only. The two SCIM scopes can alter membership, which is why they are kept apart. - A scope that depends on a plan feature can be added only if the organisation's plan includes that feature.
- Any valid token, whatever scopes it holds, can call the MCP tool
verify_hash, which performs the same check as the public verify-by-hash endpoint. - A missing scope returns
403 forbidden. The remedy is a new token that holds the scope.
Least privilege: one job, one token, fewest scopes
| Task | Scopes |
|---|---|
| LMS health check that raises an alert on failed grade returns | lms_read |
| Nightly report of submissions not yet sealed | assignments_read, records_read |
| AI coding agent exploring your data (MCP) | Only what the task requires, frequently just assignments_read |
| Provisioning from Okta or Microsoft Entra ID | scim_users, scim_groups |
| SIEM collector | audit_stream |
Practical guidelines:
- One token for each tool or person. Label it with the tool and its owner (
siem-splunk-prod,agent-cursor-jlee). Revoking one never disrupts another, and the last-used time shows which ones are still in use. - Keep write and read apart. A reporting script should not receive the SCIM scopes.
- Set an expiry every time for anything that is not a long-running service. Pick the shortest expiry the task requires; an agent for one project needs less than a permanent script.
Store tokens safely
Recommended:
- Hold tokens in a secrets manager (AWS Secrets Manager, Google Secret Manager, Azure Key Vault, HashiCorp Vault, 1Password, Doppler) or in your CI system's encrypted secrets.
- Load them into environment variables when the program runs.
- Allow only the service that uses the secret to read it.
Avoid:
- Committing tokens to any repository, private ones included. Add
.envto.gitignore. - Placing tokens in client-side code (browser JavaScript, mobile apps, browser extensions), where anyone can read them.
- Pasting tokens into chat, tickets, AI prompts or screenshots, including WhatsApp groups used by the IT team.
Reading a token from the environment:
# .env (never committed)
AUTHMARKS_TOKEN=amk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AUTHMARKS_ORG=3f2a9c1e-8b7d-4e21-9a0f-5c6d7e8f9a01
const token = process.env.AUTHMARKS_TOKEN;
if (!token?.startsWith("amk_")) {
throw new Error("AUTHMARKS_TOKEN is not set");
}
import os
token = os.environ.get("AUTHMARKS_TOKEN", "")
if not token.startswith("amk_"):
raise SystemExit("AUTHMARKS_TOKEN is not set")
Add a secret-scanning rule for the amk_ prefix to your repository (for instance a custom pattern amk_[A-Za-z0-9_-]{43} in gitleaks or your code host's scanner), so that a committed token is flagged straight away.
Rotate a token
Rotation issues a new token with the same label and scopes and revokes the old one at that same moment.
- In Settings → Developers → API tokens, click Rotate beside the token.
- Copy the new token (displayed once).
- Update the secret in your secrets manager or CI.
- Restart or redeploy the service that uses it.
- Look at the new token's last used time to confirm the service has started using it.
As the old token stops working at once, update the secret in the same change window. For a busy service that cannot have downtime, first create a second token with the same scopes, move the service to it, confirm it under last used, and then revoke the old one.
Rotate on the schedule your organisation's security policy lays down, whenever someone with access leaves (a common event when contract staff or project faculty move on), and any time you are unsure who has seen a token.
Revoke a token
Click Revoke beside the token. Revocation is immediate: the next request with that token returns 401. A revoked token cannot be brought back. Revoked tokens remain in the list (and in the audit log) for the record.
If a token leaks
- Revoke it at once in Settings → Developers. Access stops immediately.
- Issue a replacement with the same or fewer scopes and update the service.
- Assess what it could reach: its scopes and its last-used time.
- Look through your admin audit log and, if you stream it, your SIEM for activity during that period.
- Remove the token from wherever it leaked (rewrite git history, delete the message, rotate any other secret kept alongside it).
- If you believe Authmarks data was exposed, follow your incident process and contact us as described on the security page. Where personal data of students or staff may be involved, the Digital Personal Data Protection Act, 2023 sets out breach-notification duties for organisations in India; your institution and its advisers decide what applies.
More detail is in Security for integrations.
Errors you may see
| Status | Reason |
|---|---|
401 unauthorized | No Authorization header; an unknown, revoked or expired token; or another organisation's id. |
403 forbidden | The token does not hold the scope, or the plan does not include the feature the scope requires. |
429 rate_limited | More than 600 requests a minute for the token, or more than 30 failed authentications a minute from your address. Wait Retry-After seconds. |
Sources
- RFC 6750, OAuth 2.0 Bearer Token Usage — as of 2026-11-26
Change notes
- 2026-11-26 — First published.
Spotted an error? Email sales@authmarks.com and we will correct the page and date the correction.