{
sessionJwt: string; // Active session JWT
}
const timestamp = Date.now().toString();
const body = {
sessionJwt: 'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...' // Active session JWT
};
const hmac = generateHmacSignature(timestamp, body, secretKey);
const response = await axios.post(apiEndpoint + '/user/logout', body, {
headers: {
apikey: apiKey,
signature: hmac,
timestamp: timestamp
}
});
After logout, the session JWT becomes invalid and cannot be used for further API calls.
Always clean up session data in your application after a successful logout.