Refresh Token
POST
/v1/auth/refresh
const url = 'https://api.uavcrew.ai/v1/auth/refresh';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"refresh_token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.uavcrew.ai/v1/auth/refresh \ --header 'Content-Type: application/json' \ --data '{ "refresh_token": "example" }'Refresh an expired access token.
Use the refresh token to get a new access token without re-authenticating with the API key.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
RefreshRequest
Request to refresh access token.
object
refresh_token
required
Refresh Token
string
Example generated
{ "refresh_token": "example"}Responses
Section titled “Responses”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
expires_in
required
Expires In
integer
Example
{ "token_type": "bearer"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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": {} } ]}