So I am trying to search for any transactions that have been committed to Testnet that I made. I stored all transaction ID (txid) in a file. Now, my task is to measure runtime for reading 1 or simultaneously many transactions. I have found the API for Testnet indexer to request the needed information from this link: API for Testnet indexer
I successful used this code from
docs/search_tx_address_txId.py at master · algorand/docs · GitHub
to read transaction in a private network before:
# search_tx_address_txId.py import json # requires Python SDK version 1.3 or higher from algosdk.v2client import indexer # instantiate indexer client myindexer = indexer.IndexerClient(indexer_token="", indexer_address="http://localhost:8980") response = myindexer.search_transactions_by_address( address="XIU7HGGAJ3QOTATPDSIIHPFVKMICXKHMOR2FJKHTVLII4FAOA3CYZQDLG4", txid="QZS3B2XBBS47S6X5CZGKKC2FC7HRP5VJ4UNS7LPGHP24DUECHAAA") print("txid: QZS3B2XBBS47S6X5CZGKKC2FC7HRP5VJ4UNS7LPGHP24DUECHAAA = " + json.dumps(response, indent=2, sort_keys=True))
In the case for private network, I replaced the indexer_address with the address of an indexer that has been set up in the network and replaced address for the address of my node in the network. Of course, I also replaced txid with the relevant txid I got.
In testnet, I replace the indexer_address with the API for Testnet indexer, the address of my node, and txid but it does not work. I am new to using API and Algorand. So I do not know if that’s what I am supposed to do to search for transaction. When I ran the code, I got an error for
urllib.error.HTTPError: HTTP Error 403: Forbidden
What does it mean and how do I fix it?