Authorization header with your API token.
Authentication Header
Get API Token
You can obtain an API token by running the CLI login command:~/.superserve/auth.json and used automatically by the CLI and SDK.
Device Code Flow
The device code flow allows users to authenticate via a web browser. This is the method used bysuperserve login.
Initiate Device Code Flow
Device code to poll for authentication status
Human-readable code to display to the user
URL where the user should authenticate
Full URL with user code pre-filled
Number of seconds until the device code expires
Minimum number of seconds to wait between polling requests
Poll for Token
After initiating the device code flow, poll this endpoint to check if the user has completed authentication.Device code from the initial response
Access token (may be named
token instead)Access token (alternative field name)
ISO 8601 timestamp when the token expires
Refresh token for obtaining new access tokens
Error code:
authorization_pending, slow_down, expired_token, or access_deniedHuman-readable error description
Error Codes
| Code | Status | Description |
|---|---|---|
authorization_pending | 428 | User hasn’t completed authentication yet |
slow_down | 400 | Polling too frequently, wait longer |
expired_token | 410 | Device code has expired |
access_denied | 403 | User denied the authentication request |
Validate Token
Check if your current token is valid.Whether the token is valid
User information if token is valid
Get Current User
Retrieve information about the authenticated user.User ID
User email address
User’s full name
Error Responses
All authentication endpoints may return these errors:HTTP status code
Error message
Additional error context
| Status | Message |
|---|---|
| 401 | Not authenticated. Run superserve login first. |
| 403 | Access denied by user |
| 410 | Device code expired |
| 428 | Authorization pending |