POST

/User/RefreshToken

Usage Notes

When

  • Extend session before access token expires
  • Obtain new access token using refresh token

Requirements

  • Valid refreshToken in request body

Notes

  • SDK handles automatically 30 seconds before expiration
  • No other authentication required for this endpoint - it can be called without an Authorization header
  • Each refresh token can be used once; a successful call returns a new accessToken and refreshToken pair
  • An invalid, already-used or expired refresh token returns 401 - log in again

Description

Exchanges refresh token for new access and refresh token pair. Enables continuous sessions without re-authentication.

Required Headers

Authorization header is optional: This endpoint is anonymous - the refresh token in the request body is what is validated. If you also send your current access token in the Authorization header, that access token is revoked when the refresh succeeds.

HeaderValueDescription
AuthorizationBearer {accessToken}Optional. Current access token - revoked when the refresh succeeds
Content-Typeapplication/jsonRequest content type
Version2.0API version identifier

Request Body

Parameter Type Required Description
refreshToken >
string(255)
Valid refresh token for session extension.
refreshToken
string(255)
Valid refresh token for session extension.

Refresh Token Security

  • Store refresh tokens securely using encrypted storage or secure vaults
  • Never expose refresh tokens in client-side code or logs
  • Implement secure token rotation by updating stored refresh tokens
  • Monitor for invalid refresh token attempts as security indicators
  • Clear stored tokens on user logout or security events

Example Requests

bash
curl -X POST 'https://api.7g.com.au/User/RefreshToken' \
  -H 'Authorization: {accessToken}' \
  -H 'Version: 2.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "refreshToken": "cZkxxx4Y=="
  }'

Response Examples

json
{
  "accessToken": "eyJxxCJ9.eyJxxxpYyJ9.8Csxx3S-jMxxnv-4Nxxfw",
  "refreshToken": "cZkxxx4Y="
}