Authentication

auth-refresh

Làm mới access token bằng refresh token còn hiệu lực.

POST
/api/v3/auth/refresh

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

bodyobjectrequired
refreshTokenstringrequired

Refresh token còn hiệu lực để cấp mới access token.

Response Headers

X-RATELIMIT-LIMITstringoptional

Giới hạn số request trong chu kỳ.

X-RATELIMIT-REMAININGstringoptional

Số request còn lại trong chu kỳ hiện tại.

X-RATELIMIT-RESETstringoptional

Thời điểm reset giới hạn request.

Response Body

application/json

application/json

curl -X POST "https://api.ssi.com.vn/api/v3/auth/refresh" \  -H "Content-Type: application/json" \  -d '{    "refreshToken": "string"  }'

Thành công.

{
  "tokenType": "Bearer",
  "accessToken": "string",
  "refreshToken": "string",
  "expiresAt": "string",
  "refreshExpiresAt": "string"
}

Request không hợp lệ.

{
  "code": 400,
  "msg": "apiKey is required"
}