Rotate a refresh token
POST
/v1/auth/refresh
const url = 'https://api.wirevod.online/v1/auth/refresh';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"refresh_token":"wvr_9f2c.refresh"}'};
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.wirevod.online/v1/auth/refresh \ --header 'Content-Type: application/json' \ --data '{ "refresh_token": "wvr_9f2c.refresh" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
refresh_token
required
string
Example
{ "refresh_token": "wvr_9f2c.refresh"}Responses
Section titled “ Responses ”New token pair issued; the presented refresh token is invalidated.
Media typeapplication/json
object
access_token
required
string
refresh_token
required
string
token_type
required
string
expires_in
required
integer
Example
{ "access_token": "eyJhbGciOiJIUzI1NiJ9.access", "refresh_token": "wvr_ab12.next-refresh", "token_type": "bearer", "expires_in": 900}The request was malformed or failed validation.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "invalid_request", "code": "invalid_request", "message": "asset_id is required"}Missing or invalid credentials.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "unauthorized", "code": "unauthorized", "message": "Authentication required"}Too many requests in the current window.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "rate_limited", "code": "rate_limited", "message": "Too many requests", "details": { "retry_after": 60 }}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait before retrying.