Sign in with a ZTProxy username and password to obtain a Bearer token. Base URL: https://backend.ztproxy.net/api

API base URL

https://backend.ztproxy.net/api

Use this global endpoint and include a valid access token for authenticated requests.

Authentication

ZTProxy APIs use JWT Bearer tokens. Call the login endpoint with username and password, then send the returned token on authenticated requests.

Login

curl -X POST "https://backend.ztproxy.net/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "your_username",
    "password": "your_password"
  }'
{
  "code": 0,
  "message": "Login successful",
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIs...",
    "user": {
      "id": 1001,
      "username": "your_username",
      "balance": 1000,
      "status": "active"
    }
  }
}

Using the token

Send this header on authenticated calls:

Authorization: Bearer <token>

Example:

curl -X GET "https://backend.ztproxy.net/api/open/app/dashboard/info/v2" \
  -H "Authorization: Bearer <token>"

Common auth errors

HTTPMessageMeaning
401Authentication token missingNo Authorization header.
401Invalid authentication tokenToken invalid or expired.
401User not foundThe token user no longer exists.
403Account not activatedAccount exists but is not activated.

Store credentials and tokens on the server or in a secrets manager. Do not embed them in client code or logs.