Refresh access token
POST
/api/v1/auth/refresh
const url = 'https://api.ultimateteam.ai/api/v1/auth/refresh';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', '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.ultimateteam.ai/api/v1/auth/refresh \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "refresh_token": "example" }'Exchange a single-use refresh token for a new token pair.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
RefreshRequest
Request body for the token refresh endpoint.
Attributes: refresh_token: A valid refresh token.
object
refresh_token
required
Refresh Token
Valid refresh token
string
Examplegenerated
{ "refresh_token": "example"}Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
RefreshResponse
Response body for the token refresh endpoint.
Attributes: access_token: A short-lived JWT access token. refresh_token: A long-lived JWT refresh token. token_type: Always ‘bearer’.
object
access_token
required
Access Token
Short-lived JWT access token
string
refresh_token
required
Refresh Token
Long-lived JWT refresh token
string
token_type
required
Token Type
Token scheme, always ‘bearer’
string
Examplegenerated
{ "access_token": "example", "refresh_token": "example", "token_type": "example"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}