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/apiUse 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
| HTTP | Message | Meaning |
|---|---|---|
| 401 | Authentication token missing | No Authorization header. |
| 401 | Invalid authentication token | Token invalid or expired. |
| 401 | User not found | The token user no longer exists. |
| 403 | Account not activated | Account 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.