Logs out the current user and deletes the specific session for the given refresh token.
POST
/api/auth/v1/logout
const url = 'https://example.com/api/auth/v1/logout';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://example.com/api/auth/v1/logout \ --header 'Content-Type: application/json' \ --data '{ "refresh_token": "example" }'Relies on the client to drop any auth tokens.
Request Body required
Section titled “Request Body required ” Media type application/json
object
refresh_token
required
string
Example generated
{ "refresh_token": "example"}Responses
Section titled “ Responses ”Auth & refresh tokens.