# Refresh Client Token

Obtains a new access token and refresh token pair using a valid refresh token. This endpoint requires AK/SK signature authentication from your institution's backend service. Both the refresh token and request signature are validated before issuing new credentials. The old tokens will be invalidated after successful refresh. <br/>• Access token expires in approximately 2 hours (may vary slightly)<br/>• Refresh token expires in 15 days<br/>• **Note**: This access_token is used to access Market Data API

# OpenAPI definition

```json
{
  "info": {
    "title": "Webull Open API Reference",
    "description": "application.yml\\ncom\\ni18n\\nMETA-INF\\nstatic\\n\\r\\n",
    "contact": {
      "name": "",
      "url": "",
      "email": ""
    },
    "version": "2.0",
    "x-logo": {
      "url": "static/png/logo.png"
    }
  },
  "servers": [
    {
      "url": "https://hk-co-branding-openapi.uat.webullbroker.com"
    }
  ],
  "path": "/auth/client-tokens/refresh",
  "method": "post",
  "tags": [
    "Client-To-Server"
  ],
  "description": "Obtains a new access token and refresh token pair using a valid refresh token. This endpoint requires AK/SK signature authentication from your institution's backend service. Both the refresh token and request signature are validated before issuing new credentials. The old tokens will be invalidated after successful refresh. <br/>• Access token expires in approximately 2 hours (may vary slightly)<br/>• Refresh token expires in 15 days<br/>• **Note**: This access_token is used to access Market Data API",
  "operationId": "refreshClientToken",
  "parameters": [
    {
      "name": "x-app-key",
      "in": "header",
      "description": "A unique identifier issued to a developer for accessing an application's API.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "x-app-secret",
      "in": "header",
      "description": "A unique key issued to developers to access the application's API.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "x-timestamp",
      "in": "header",
      "description": "Timestamp of the request, follows ISO8601 format: YYYY-MM-DDThh:mm:ssZ, e.g. 2023-07-16T19:23:51Z, only supports UTC time zone.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "x-signature-version",
      "in": "header",
      "description": "Signature algorithm version, default is 1.0.",
      "required": true,
      "schema": {
        "type": "string",
        "default": "1.0"
      },
      "examples": {
        "1.0": {
          "value": "1.0"
        }
      }
    },
    {
      "name": "x-signature-algorithm",
      "in": "header",
      "description": "Signature algorithm, default is HMAC-SHA1.",
      "required": true,
      "schema": {
        "type": "string",
        "default": "HMAC-SHA1"
      },
      "examples": {
        "HMAC-SHA1": {
          "value": "HMAC-SHA1"
        }
      }
    },
    {
      "name": "x-signature-nonce",
      "in": "header",
      "description": "Signature unique random number.",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "required": [
            "refresh_token"
          ],
          "type": "object",
          "properties": {
            "refresh_token": {
              "type": "string",
              "description": "The refresh token obtained from the token creation or previous refresh operation.",
              "example": "19b68a108ad-4013b3daec584bc2b078ae1902ce0986"
            }
          },
          "description": "Token Refresh Request",
          "title": "TokenRefreshReq"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "access_token",
              "expires_at",
              "refresh_expires_at",
              "refresh_token"
            ],
            "type": "object",
            "properties": {
              "access_token": {
                "type": "string",
                "description": "Short-lived token for API authorization.",
                "example": "US.19b68a108ad-51627ef292044cc3b39c37800523d803"
              },
              "expires_at": {
                "type": "integer",
                "description": "Access Token Expiration Time in milliseconds since epoch.",
                "format": "int64",
                "example": 1766987799637
              },
              "refresh_token": {
                "type": "string",
                "description": "Long-lived token for obtaining new access tokens.",
                "example": "19b68a108ad-4013b3daec584bc2b078ae1902ce0986"
              },
              "refresh_expires_at": {
                "type": "integer",
                "description": "Refresh Token Expiration Time in milliseconds since epoch.",
                "format": "int64",
                "example": 1767004942637
              }
            },
            "description": "Token Refresh Result",
            "title": "TokenRefreshResult"
          }
        }
      }
    }
  },
  "jsonRequestBodyExample": {
    "refresh_token": "19b68a108ad-4013b3daec584bc2b078ae1902ce0986"
  },
  "postman": {
    "name": "Refresh Client Token",
    "description": {
      "content": "Obtains a new access token and refresh token pair using a valid refresh token. This endpoint requires AK/SK signature authentication from your institution's backend service. Both the refresh token and request signature are validated before issuing new credentials. The old tokens will be invalidated after successful refresh. <br/>• Access token expires in approximately 2 hours (may vary slightly)<br/>• Refresh token expires in 15 days<br/>• **Note**: This access_token is used to access Market Data API",
      "type": "text/plain"
    },
    "url": {
      "path": [
        "auth",
        "client-tokens",
        "refresh"
      ],
      "host": [
        "{{baseUrl}}"
      ],
      "query": [],
      "variable": []
    },
    "header": [
      {
        "disabled": false,
        "description": {
          "content": "(Required) A unique identifier issued to a developer for accessing an application's API.",
          "type": "text/plain"
        },
        "key": "x-app-key",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) A unique key issued to developers to access the application's API.",
          "type": "text/plain"
        },
        "key": "x-app-secret",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) Timestamp of the request, follows ISO8601 format: YYYY-MM-DDThh:mm:ssZ, e.g. 2023-07-16T19:23:51Z, only supports UTC time zone.",
          "type": "text/plain"
        },
        "key": "x-timestamp",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) Signature algorithm version, default is 1.0.",
          "type": "text/plain"
        },
        "key": "x-signature-version",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) Signature algorithm, default is HMAC-SHA1.",
          "type": "text/plain"
        },
        "key": "x-signature-algorithm",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) Signature unique random number.",
          "type": "text/plain"
        },
        "key": "x-signature-nonce",
        "value": ""
      },
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "method": "POST",
    "body": {
      "mode": "raw",
      "raw": "",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    }
  }
}
```
