Authmarks API authentication: organization tokens and scopes
How Authmarks organization API tokens work for Canadian campus IT teams: the amk_ format, scopes and the plan features behind them, expiry, rotation, revocation, safe storage and what to do when 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; displayed once |
| Live tokens | Up to 20 per organization |
| Expiry | Optional, 1 to 730 days |
| Who manages tokens | Organization owners and admins |
What this page covers: how to issue, scope, store, rotate and revoke the tokens that call Authmarks. A single kind of credential, the organization API token, serves the REST API, the MCP server, and SCIM provisioning and the audit stream. Every token belongs to exactly one organization and carries only the scopes you pick for it.
How tokens work
| Property | Detail |
|---|---|
| Format | amk_ then 43 base64url characters (32 random bytes). |
| Displayed | Once only, at creation or rotation. Copy it at that moment. |
| Stored | Only as a SHA-256 hash, plus the first 12 characters so that admins can tell one token from another. Authmarks has no way to display a token a second time. |
| Organization | Each token belongs to a single organization. Sent with a different organization's id, it returns 401, the same as an unknown token. |
| Scopes | Set when the token is created and fixed after that. To change them, create a new token and revoke the old one. |
| Live tokens | At most 20 live (neither revoked nor expired) tokens per organization. |
| Expiry | Optional, from 1 to 730 days. With no expiry, the token stays valid until someone revokes it. |
| Last used | The Developers tab records the last time each token was used. |
| Who | Owners and admins create, rotate and revoke tokens. Authmarks support staff cannot create or rotate a token, not even during a support session. |
| Audit | Each creation, rotation and revocation is written to the organization's admin audit log before it takes place. Neither the token nor its hash is ever logged. |
Every request carries the token as a bearer token:
curl -sS "https://www.authmarks.com/api/v1/orgs/$AUTHMARKS_ORG/assignments" \
-H "Authorization: Bearer $AUTHMARKS_TOKEN"
Keep tokens out of URL query strings. URLs get copied into server logs, browser history and referrer headers.
Scopes
| Scope | What it grants | 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 keep in mind:
- The three
_readscopes, like the whole of REST API v1, are read-only. The two SCIM scopes can change who belongs to the organization, which is why they stand apart. - A scope that depends on a plan feature can be added only when the organization's plan includes it.
- Any valid token, regardless of its scopes, may 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 fix is a new token that holds the scope.
Least privilege: one job, one token, fewest scopes
| Job | Scopes |
|---|---|
| LMS health check that raises an alert when a grade return fails | lms_read |
| Overnight report listing unsealed submissions | assignments_read, records_read |
| AI coding agent looking through your data (MCP) | Only what the task calls for, often assignments_read alone |
| Provisioning from Okta or Microsoft Entra ID | scim_users, scim_groups |
| SIEM collector | audit_stream |
Rules of thumb:
- A separate token for each tool or person. Name it after the tool and its owner (
siem-splunk-prod,agent-cursor-jlee). Revoking one never breaks the others, and the last-used time shows you which are still in service. - Keep writing and reading apart. A reporting script should never hold the SCIM scopes.
- Set an expiry every time unless the token serves a long-running service. Pick the shortest expiry the job allows; an agent working on one project needs less time than a standing script.
Store tokens safely
Do:
- 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.
- Limit read access on the secret to the one service that uses it.
Don't:
- Commit a token to any repository, private ones included. Put
.envin.gitignore. - Ship tokens in client-side code (browser JavaScript, mobile apps, browser extensions), where anyone can read them.
- Paste tokens into chat, help desk tickets, AI prompts or screenshots.
Loading 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 (a custom pattern such as amk_[A-Za-z0-9_-]{43} in gitleaks or in your code host's scanner) so that any committed token is flagged straight away.
Rotate a token
Rotating issues a new token with the same label and scopes and revokes the old one in the same instant.
- Under Settings → Developers → API tokens, select Rotate beside the token.
- Copy the new token (it is displayed once).
- Replace the secret in your secrets manager or CI.
- Restart or redeploy the service that relies on it.
- Look at the new token's last used time to confirm the service is using it.
The old token stops working the moment you rotate, so update the secret in the same change window. To rotate a busy service with no downtime, first create a second token with identical scopes, move the service onto it, confirm it under last used, and only then revoke the old one.
Rotate as often as your organization's security policy sets, whenever someone with access leaves, and any time you are not sure who has seen a token.
Revoke a token
Select Revoke beside the token. It takes effect at once: the very 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 straight away under Settings → Developers. Access ends immediately.
- Issue a replacement with the same scopes or fewer, and update the service.
- Work out what it could reach: its scopes and its last-used time.
- Review your admin audit log, and your SIEM if you stream to one, for activity during that period.
- Clean up wherever it leaked (rewrite git history, delete the message, rotate any other secret stored alongside it).
- If you believe Authmarks data was exposed, follow your incident process and get in touch as described on the security page. At a Canadian institution, your privacy office will also know whether PIPEDA or a provincial law such as Ontario's FIPPA or Quebec's Law 25 calls for a breach report; that decision belongs to the institution.
See Security for integrations for more.
Errors you may see
| Status | Cause |
|---|---|
401 unauthorized | No Authorization header; a token that is unknown, revoked or expired; or a different organization's id. |
403 forbidden | The token does not hold the scope, or the plan does not include the feature the scope depends on. |
429 rate_limited | More than 600 requests a minute on the token, or more than 30 failed authentications a minute from your address. Wait for 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.