Get token URI for an ERC721 or ERC1155 token
GET/:network/nft/token-uri
Get token URI for an ERC721 or ERC1155 token
Request
Path Parameters
network stringrequired
Blockchain network name or chain id
Query Parameters
token_address stringrequired
The contract address of the ERC721 or ERC1155 token.
token_id numberrequired
The token ID for which the token URI is requested.
projectId stringrequired
The id of your project. Can be found in your Histori dashboard.
Responses
- 200
- 400
- 404
The token URI and metadata.
- application/json
- Schema
- Example (from schema)
Schema
network_name stringrequired
Blockchain network name For the requested query
chain_id numberrequired
The chain ID of the network.
token_id numberrequired
The token ID for the specific NFT.
token_uri stringrequired
The URI of the token, which can be an HTTP or IPFS URL.
metadata objectrequired
The metadata of the token, which can include images, attributes, and other data.
{
"network_name": "eth-mainnet",
"chain_id": 1,
"token_id": 2,
"token_uri": "https://ipfs.io/ipfs/QmXUpbiHn8R42REihF5K8iEdi5yq6Xg81nVTfETLfCfK6k/metadata.json",
"metadata": {
"name": "peace",
"description": "peace",
"image": "https://ipfs.io/ipfs/Qmdw9iDyhb4V5njWgvPcCb71sdws2TZh77jEhqZn2TTiNE/nft.jpg"
}
}
Invalid contract or token ID.
Could not find token URI.
Loading...