Errors
Every error code Corpland ID returns and what your app should do about it.
Errors are { "message": "...", "code": "..." }. Show message to people when it helps; branch on code in your code. Messages are written in plain language and may change; codes do not.
OAuth
| Code | Status | When | What to do |
|---|---|---|---|
invalid_client | 404 | Unknown client_id | Check your config and registration |
invalid_redirect_uri | 400 | Callback or post logout address not registered | Register it with registerClient.js |
invalid_request | 400 | Missing state or PKCE challenge | Send both, method S256 |
invalid_grant | 400 | Code expired, used, or for another client; wrong verifier; refresh token ended | Start sign in again |
token_reused | 400 | An old refresh token came back after the 10 second grace | Treat as signed out and start sign in again |
unsupported_grant_type | 400 | Anything other than authorization_code or refresh_token | Fix the request |
venture_forbidden | 403 | The venture picked is not one the person belongs to | Ask them to pick again |
account_unavailable | 403 | The Corpland ID was deleted | Sign the person out |
TOO_MANY_REQUESTS | 429 | Rate limit on token, authorize, sign in or code requests | Back off and retry later |
Ventures
| Code | When |
|---|---|
VENTURE_NOT_FOUND | No such venture, or it was deleted |
NOT_A_MEMBER | You are not an active member |
FORBIDDEN_CAPABILITY | Your role cannot do this |
OWNER_ONLY | Only the owner can do this |
LAST_OWNER | The owner tried to leave; transfer first |
ALREADY_MEMBER | The invited email already belongs to a member |
INVALID_ROLE | Role must be admin or member |
INVITE_NOT_FOUND | The invitation link is not valid |
INVITE_EXPIRED | The invitation expired; ask for it again |
INVITE_EMAIL_MISMATCH | Signed in with a different email than the one invited |
INVITE_CLOSED | Already accepted, declined or cancelled |
TRANSFER_TARGET_INVALID | The new owner must be an existing admin |
SLUG_TAKEN | Another venture uses that handle |
SELF_ACTION | You cannot change or remove yourself this way |