Appearance
Personal access tokens
Use a personal access token to call the LockitNetwork API from your own scripts, build pipelines, or single-user tools without registering an OAuth 2.0 client.
When to use a personal access token
- Use a personal access token when you call the API under your own LockitNetwork account from a script, CLI, or internal automation.
- Use OAuth 2.0 when you build an integration that acts on behalf of multiple LockitNetwork users.
Create a token
Personal access tokens are created in the LockitNetwork web app. No API endpoint creates a token without a browser session.
- Open Account Settings in LockitNetwork and select API Tokens.
- Select Create token.
- Enter a descriptive name (1 to 100 characters).
- Choose an expiration date. Every token expires. The maximum lifetime is 365 days.
- Choose whether the token applies to All projects or Selected projects.
- Select the non-administrative access rights the token may exercise.
- Select Create token and copy the secret value immediately.
A personal access token starts with ln_pat_ and is 50 characters long. LockitNetwork stores only a SHA-256 hash of the token and never shows the secret again. If you lose the secret, revoke the token and create a new one.
Treat the token like a password. Store it in an environment variable or a secret store, and never commit it to version control or paste it into a ticket or chat.
You can hold up to 20 active personal access tokens at the same time.
Send requests
Send the token in the Authorization HTTP header with the Bearer scheme:
http
Authorization: Bearer ln_pat_...LockitNetwork does not accept personal access tokens in X-Lockit-Token, the token query parameter, cookies, or WebSocket upgrades. Do not send a personal access token together with another authentication scheme in the same request. Conflicting schemes return 400 Bad Request.
Set your token in an environment variable and verify your identity with GET /user:
bash
export LOCKIT_TOKEN="ln_pat_..."
curl -sS -i \
-H "Authorization: Bearer $LOCKIT_TOKEN" \
https://api.lockitnetwork.com/userA valid token returns 200 OK with your basic user record:
json
{
"uuid": "efcab81a67b04af3a149fbf7d6d884e7",
"login": "alice",
"email": "[email protected]"
}List the projects inside the token's scope with GET /projects:
bash
curl -sS -i \
-H "Authorization: Bearer $LOCKIT_TOKEN" \
https://api.lockitnetwork.com/projectsRead scenes from a premium project in scope by replacing PROJECT_ID with a project uuid from the previous response:
bash
export PROJECT_ID="d591f63022ea4fc9a684c6888f58c59a"
curl -sS -i \
-H "Authorization: Bearer $LOCKIT_TOKEN" \
"https://api.lockitnetwork.com/projects/$PROJECT_ID/scenes"Scope and access rights
Every request authenticated with a personal access token must satisfy four rules.
- Premium projects only. Project endpoints require a premium project. Calling a non-premium project returns
403 Forbiddenwith{"reason":"premiumProjectRequired"}. - Project scope. A token scoped to Selected projects reaches only those projects. Calling any other project returns
403 Forbiddenwith{"reason":"projectAccessDenied"}. Report listings and single-report routes also filter to projects in the token's scope. - Effective rights. A token's rights on a project are your own current project rights intersected with the rights selected when the token was created, on top of plain project membership.
- Standard right inheritance applies within the selectable rights (
project-admin,work-times,day-comments,material-time,progress-report,post-prod-reports,clip-match,editors-rt, andannotations). - Tokens never get administrative rights, even if you hold them.
- If your access to a project or a right is later removed, the token loses that access immediately.
- Standard right inheritance applies within the selectable rights (
- Account and admin routes are blocked. Personal access tokens cannot manage your account, create or leave projects, manage other tokens, or call admin routes.
The table below lists the access right required by each documented API operation.
| Operation | Right in LockitNetwork | Wire name |
|---|---|---|
modifyScene, modifyEpisodeScene | Editor's running time | editors-rt |
matchDayClips | Clip metadata | clip-match |
getProjectDayProgressReport | Progress reports | progress-report |
writeAnnotation, deleteAnnotation | Annotations | annotations |
| The other 14 documented operations | Project membership only | None |
Errors and rate limits
| Status | Meaning |
|---|---|
400 Bad Request | The request sent two authentication schemes at once. |
401 Unauthorized | The token is malformed, unknown, expired, or revoked, your user account is inactive, or the endpoint requires a first-party session. All token authentication failures return the same 401 response. |
403 Forbidden | The project is outside the token's scope (projectAccessDenied), is not a premium project (premiumProjectRequired), or requires an access right the token does not have (accessRightRequired). |
429 Too Many Requests | Your personal access token rate budget is exhausted. Wait until the Retry-After or RateLimit reset window passes. |
All of your personal access tokens share one rate-limit budget that is separate from your web browser session. A busy script cannot lock you out of LockitNetwork while you open settings to revoke its token.
Revoke or rotate a token
- To revoke one token or all of your tokens, open Account Settings in LockitNetwork, select API Tokens, and revoke it. Revocation takes effect immediately.
- To rotate a token without downtime, create a replacement token first, update your script or secret store, and then revoke the old token.
- Changing your own password keeps existing personal access tokens active. Resetting your password or having an administrator override your password revokes all of your active personal access tokens immediately.