> For the complete documentation index, see [llms.txt](https://docs.tylt.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tylt.money/tylt-embedded-wallet-service/wallet-management-apis/get-wallet-address.md).

# Get Wallet Address

Retrieves a blockchain wallet address through which the end user can receive crypto.

### Endpoint

```http
GET /whitelabel/wallet/getWalletAddress
```

### Request Headers

```http
x-tlp-apikey: <api-key>
x-tlp-signature: <hmac-signature>
```

### Query Parameters

The request must include:

1. One end-user identifier
2. The token or asset
3. The blockchain network

### Query Parameters

Provide at least one of the following user identifiers: `endUserEmail`, `endUserId`, or `externalUserId`.

| Field            | Type   |    Required | Description                         |
| ---------------- | ------ | ----------: | ----------------------------------- |
| `endUserEmail`   | String | Conditional | End user’s registered email address |
| `endUserId`      | Number | Conditional | Tylt end-user ID                    |
| `externalUserId` | String | Conditional | Merchant’s own user identifier      |
| `networkid`      | String |         Yes | Network Id for the Symbol           |
| `networkSymbol`  | String |         Yes | The Network Symbol                  |

At least one identifier is required.

### Example Request

```http
GET /whitelabel/wallet/getWalletAddress?externalUserId=user-10021&currency=USDT&network=TRON
```

Signed query object:

```json
{
  "endUserId": 20001, // Optional: Provide one user identifier only
  "endUserEmail": "joe@example.com", // Optional: Alternative to endUserId and externalUserId
  "externalUserId": "user-10021", // Optional: Alternative to endUserId and endUserEmail
  "networkId": "1",
  "networkSymbol": "TX"
}
```

> The exact field names for the asset and network must be confirmed against the deployed wallet-address controller.

### Code Snippet

{% tabs %}
{% tab title="JavaScript (Axios)" %}

```javascript
import crypto from 'crypto';
import axios from 'axios';

const apiKey = 'your-api-key';
const apiSecret = 'your-api-secret';

const queryParams = {
    endUserId: 20001, // Optional: Provide one user identifier only
    endUserEmail: "joe@example.com", // Optional: Alternative to endUserId and externalUserId
    externalUserId: "user-10021", // Optional: Alternative to endUserId and endUserEmail
    networkId: '1',
    networkSymbol: 'TRX'
};

const rawPayload = JSON.stringify(queryParams);
const signature = crypto.createHmac('sha256', apiSecret).update(rawPayload).digest('hex');

const headers = {
    'x-tlp-apikey': apiKey,
    'x-tlp-signature': signature
};

const queryString = new URLSearchParams(queryParams).toString();
axios.get(`https://api.tylt.money/whitelabel/wallet/getWalletAddress?${queryString}`, { headers })
    .then(response => console.log(response.data))
    .catch(error => console.error('Error:', error.response ? error.response.data : error.message));
```

{% endtab %}
{% endtabs %}

### Example Response

```json
{
    "msg": "",
    "data": {
      "publicAddress": "TTnUAQaRyhZQdJJZi4Zhc9saUbMqta7Gng"
    }
  }
```

### Merchant Responsibilities

The merchant should clearly display:

* Token
* Network
* Wallet address
* QR code
* Memo or tag, where applicable
* Minimum deposit amount
* Required blockchain confirmations
* Unsupported-asset warning

***

##
