List topic messages by ID
This method will use 15 Compute Units.
15
Last updated 8 months ago
Returns the list of topic messages for the given topic id.
Network entity ID in the format of shard.realm.num
shard.realm.num
"0.1.2"
^\d{1,10}\.\d{1,10}\.\d{1,10}$
OK
const response = await fetch('https://mainnet.hedera.validationcloud.io/v1/YOUR_API_KEY/api/v1/topics/{topicId}/messages', { method: 'GET', headers: {}, }); const data = await response.json();
{ "messages": [ { "chunk_info": { "initial_transaction_id": "0.0.10-1234567890-000000321", "nonce": 3, "number": 1, "total": 2, "scheduled": true }, "consensus_timestamp": "1234567890.000000001", "message": "bWVzc2FnZQ==", "payer_account_id": "0.0.10", "running_hash": "cnVubmluZ19oYXNo", "running_hash_version": 2, "sequence_number": 1, "topic_id": "0.0.7" } ], "links": { "next": "/api/v1/transactions?timestamp=lt:1657598275.517984411" } }