Authorization
Authenticate protected requests with an account Transfer Key or a Bearer access token.
Examples use LTC unless stated otherwise. Use IDs and addresses for the selected currency.
On this page
#Login
POST
/auth/login
Available
Exchange an Account ID or Wallet ID and its Transfer Key for an access token and a refresh token. The access token lasts 10 minutes; the session lasts up to 30 days.
- URL
https://coinzaka.com/api/v1/auth/login- Content type
application/json
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
login | string | Account ID or Wallet ID. | Required |
password | string | Transfer Key of that Account or wallet. | Required |
curl --request POST "https://coinzaka.com/api/v1/auth/login" \
--header 'Content-Type: application/json' \
--data-binary @- <<JSON
{
"login": "${ACCOUNT_ID:?Set ACCOUNT_ID}",
"password": "${TRANSFER_KEY:?Set TRANSFER_KEY}"
}
JSON{
"login": "ACCOUNT_ID",
"password": "TRANSFER_KEY"
}Bash: set ACCOUNT_ID, TRANSFER_KEY before running. Replace placeholders in the JSON Request tab. Responses are illustrative. Keep credentials on your server and out of shared code.
#Refresh Tokens
POST
/auth/refresh-token
Available
Send the refresh token in the Authorization header with no request body. A successful refresh replaces both tokens and invalidates the previous pair.
- URL
https://coinzaka.com/api/v1/auth/refresh-token- Content type
application/json- Authorization
Authorization: Bearertoken.- Authorization
Bearer REFRESH_TOKENRequired
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | string | Bearer refresh token. | Required |
curl --request POST "https://coinzaka.com/api/v1/auth/refresh-token" \
--header "Authorization: Bearer ${REFRESH_TOKEN:?Set REFRESH_TOKEN}"Bash: set REFRESH_TOKEN before running. Responses are illustrative. Keep credentials on your server and out of shared code.
#Logout
POST
/auth/logout
Available
Revoke the current session using its access token. Both tokens become invalid.
- URL
https://coinzaka.com/api/v1/auth/logout- Content type
application/json- Authorization
Authorization: Bearertoken.- Authorization
Bearer ACCESS_TOKENRequired
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | string | Bearer access token. | Required |
curl --request POST "https://coinzaka.com/api/v1/auth/logout" \
--header "Authorization: Bearer ${ACCESS_TOKEN:?Set ACCESS_TOKEN}"Bash: set ACCESS_TOKEN before running. Responses are illustrative. Keep credentials on your server and out of shared code.
#Protected Endpoints
Available
| Credential | Placement | Use |
|---|---|---|
| Transfer Key | transfer-key query parameter or JSON body field | Protected account operations |
| Access token | Authorization: Bearer ACCESS_TOKEN | Protected account operations and logout |
| Refresh token | Authorization: Bearer REFRESH_TOKEN | Token refresh only |