API Reference

List Info User by Token - /token/users/me

List info user by token

This endpoint allows users to retrieve a data user using an API KEY.

Authentication

ATTENTION: You Need an API Key Token to Access This Endpoint!

Click here to learn how to create an API Key Token → (API Key Token Guide

This endpoint requires an API KEY token. The token must be sent in the api-token header.

Example:

--header 'api-token: xxxxxxxxxx'

If the token is missing, the API will return:

{
    "statusCode": 401,
    "status": "error",
    "timestamp": "2025-03-04T14:11:39.814Z",
    "path": "/token/user/me",
    "data": {
        "message": "ApiKey not provided",
        "error": "Unauthorized",
        "statusCode": 401
    }
}

If the token is invalid, the API will return:

{
    "statusCode": 401,
    "status": "error",
    "timestamp": "2025-03-04T14:12:17.651Z",
    "path": "/token/users/me",
    "data": {
        "message": "Invalid token",
        "error": "Unauthorized",
        "statusCode": 401
    }
}

Endpoints

Retrieve a data User by API Token

Method: GET
URL: /token/users/me Authentication: Required (API KEY Token) Description: Retrieves a data user by specific api token.

Request Example

curl --location 'https://api.zaffex.com/token/users/me' \
--header 'api-token: <your_token_here>'

Success Response (200)

{
    "id": "01JTS65TJVVMXQY2VW0VW0VAS2",
    "tenantId": "01HZDQXAXT4XHT9PCXSF0DY333",
    "kycLevelId": "01JP3SJMMSXS81TK8FWKHA1GY0",
    "twoFactorId": "01JV3BGJXDW2DGXSQT5GXZY4WT",
    "email": "[email protected]",
    "affiliateId": "01J16K0A77M3FH1DSARTZ2X060",
    "name": "name-user",
    "nickname": "#18715772",
    "influencer": false,
    "bot": false,
    "publicProfile": true,
    "passwordV2": true,
    "country": "BR",
    "language": "ptBr",
    "active": true,
    "banned": false,
    "deleted": false,
    "emailVerified": true,
    "legacy": false,
    "phoneCountryCode": "55",
    "phone": "99999999999",
    "params": {
        "maxWithdrawalAmount": 2000,
        "ignoreTenantUserLimitation": false
    },
    "copyTradeParams": {
        "copyCommissionRate": 50,
        "maxFollowerAmountPerTrade": 10000000,
        "autoApproveCopyFollowers": false
    },
    "lastLoginAt": "2025-05-27T18:39:38.187Z",
    "flags": [],
    "createdAt": "2025-05-09T00:12:29.148Z",
    "updatedAt": "2025-05-27T18:39:38.304Z"
}

Possible Errors

Status CodeMessageDescription
401UnauthorizedToken is missing or invalid
500Internal Server ErrorUnexpected server error

Usage Example

To retrieve wallets using curl:

curl -X GET "https://api.zaffex.com/token/users/me" \
  -H "api-token: <your_api_key_here>"

Using JavaScript fetch:

fetch("https://api.zaffex.com/token/users/me", {
  method: "GET",
  headers: {
    "api-token": "<your_api_key_here>"
  }
})
.then(response => response.json())
.then(data => console.log(data));

Using TypeScript with fetch:

async function fetchUserData(apiKey: string): Promise<void> {
  try {
    const response = await fetch("https://api.zaffex.com/token/users/me", {
      method: "GET",
      headers: {
        "api-token": apiKey
      }
    });
    
    if (!response.ok) {
      throw new Error(`HTTP error! Status: ${response.status}`);
    }
    
    const data = await response.json();
    console.log("User data:", data);
  } catch (error) {
    console.error("Error fetching user data:", error);
  }
}

// Usage example:
fetchWallets("<your_api_key_here>");
Language
Click Try It! to start a request and see the response here!