Skip to content

Get Token

POST
/v1/auth/token
curl --request POST \
--url https://api.uavcrew.ai/v1/auth/token \
--header 'Content-Type: application/json' \
--data '{ "api_key": "example" }'

Exchange API key for JWT tokens.

Returns an access token (short-lived) and refresh token (long-lived). Use the access token in the Authorization header for API requests.

Example:

Authorization: Bearer <access_token>
Media typeapplication/json
TokenRequest

Request for JWT token using API key.

object
api_key
required
Api Key
string

Example generated

{
"api_key": "example"
}

Successful Response

Media typeapplication/json
TokenResponse

JWT token response.

object
access_token
required
Access Token
string
refresh_token
required
Refresh Token
string
token_type
Token Type
string
default: bearer
expires_in
required
Expires In
integer

Example

{
"token_type": "bearer"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}