Total Access Docs
Openapi

Refresh access token

Exchanges a refresh token for a new access token.

POST
/api/v1/auth/refresh

Exchanges a refresh token for a new access token.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/auth/refresh" \  -H "Content-Type: application/json" \  -d '{    "refresh_token": "string"  }'
{  "success": true,  "data": {    "access_token": "string",    "refresh_token": "string",    "expires_in": 0,    "token_type": "Bearer"  }}
{  "success": false,  "error": {    "code": "UNAUTHORIZED",    "message": "API key required",    "request_id": "req_abc123",    "documentation_url": "https://dev-developer.totalaccess.co.za/docs/api-reference/errors#unauthorized"  }}