Refresh an expired session token
POST
/v2/portal/auth/token/refresh
curl --request POST \ --url https://api.sipstack.com/v2/portal/auth/token/refreshimport requests
url = "https://api.sipstack.com/v2/portal/auth/token/refresh"
response = requests.post(url)
print(response.json())const url = 'https://api.sipstack.com/v2/portal/auth/token/refresh';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import axios from 'axios';
const options = {method: 'POST', url: 'https://api.sipstack.com/v2/portal/auth/token/refresh'};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}Re-issues a session JWT from an expired but signature-valid token (cookie or Bearer header), provided the underlying server-side session is still active. The new token keeps the original lifetime window (8 hours, or 7 days for remember-me sessions). Rate limited to 30 requests/minute per IP.
Responses
Section titled “ Responses ”New token issued (and the cookie refreshed).
Media type application/json
object
success
boolean
data
object
accessToken
string
Example generated
{ "success": true, "data": { "accessToken": "example" }}No token, invalid signature, or the session is no longer active — log in again.