Delete User Token
Recalls a tokenized asset from a user: the platform takes back everything the named wallet holds of the token. Holdings are per wallet, so wallet_id is required. It must be one of this user's wallets on the token's chain, and it must hold the token; another wallet of the same user does not count.
The call is asynchronous. 200 means the recall was queued. It runs as a node transaction of type 32 (RecallToken) on the account node that owns the token; follow it with List Node Transactions.
Required permission: user:update
Request
DELETE /v2/users/{user_id}/tokens/{token_id}?wallet_id={wallet_id}
Parameters
| Name | Type | In | Description |
|---|---|---|---|
user_id | string | path | Required. User ID |
token_id | string | path | Required. Token to recall |
wallet_id | string | query | Required. The user's wallet the token is recalled from. Must be on the token's chain |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Example
curl --request DELETE \
--url '{{baseUrl}}/v2/users/6a87455ad5f439809d488ac3/tokens/67d8774e903bfcbe7eb5d93e?wallet_id=6a8754e187be1d0e22aa6d83' \
--header 'Authorization: Bearer <access_token>'
Response
Status Code: 200 OK, empty body.
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10015 | Validation failed (wallet_id missing) — see details |
| 400 | 10016 | user_id, token_id or wallet_id is not a valid id |
| 400 | 10001 | User not found (domain 1) |
| 400 | 10015 | token not found, or user does not have this token (the named wallet holds none of it) |
| 400 | 10015 | Domain 1: wallet does not belong to this user on this network — the wallet does not exist, is not this user's, or is not on the token's chain |
The last row shares the number 10015 with the common validation error; tell them apart by domain (1 vs 100).
See Errors for the error format and common codes.