Refresh access token
POST
/api/auth/refresh
const url = 'http://localhost:3001/api/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 http://localhost:3001/api/auth/refresh \ --header 'Content-Type: application/json' \ --data '{ "refresh_token": "example" }'Generate a new access token using a valid refresh token
Request Bodyrequired
Section titled “Request Bodyrequired”Refresh token request
Media typeapplication/json
object
refresh_token
string
Examplegenerated
{ "refresh_token": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
key
additional properties
any
Examplegenerated
{}Bad Request
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Unauthorized
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}