Refresh NFT Metadata
This method refreshes metadata of one NFT and metadata of related transactions with the same token_address and token_id.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| chain | string | Chains which holds the NFT you would like to updated metadata for. |
| token_address | string | Token address. |
| token_id | string | Token ID. |
| komodo_proxy | boolean | Optional. Indicates whether authentication is required for accessing the proxy URLs (true if authentication is necessary, otherwise false). |
| url | string | URL link to the Moralis API proxy base url (https://moralis-proxy.komodo.earth) or equivalent (if komodo_proxy is set to true, will need to provide a new Komodo Proxy URL). |
| url_antispam | string | URL link to the Antispam API proxy base url or equivalent. docs. |
📌 Example
POST Refresh NFT Metadata
refresh_nft_metadata {
"userpass": "RPC_UserP@SSW0RD",
"method": "refresh_nft_metadata",
"mmrpc": "2.0",
"params": {
"token_address": "0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff",
"token_id": "5",
"chain": "POLYGON",
"url": "https://moralis-proxy.komodo.earth",
"url_antispam": "https://nft.antispam.dragonhound.info"
}
} curl --url "http://127.0.0.1:7783" --data '{
"userpass": "RPC_UserP@SSW0RD",
"method": "refresh_nft_metadata",
"mmrpc": "2.0",
"params": {
"token_address": "0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff",
"token_id": "5",
"chain": "POLYGON",
"url": "https://moralis-proxy.komodo.earth",
"url_antispam": "https://nft.antispam.dragonhound.info"
}
}' import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "refresh_nft_metadata",
"mmrpc": "2.0",
"params": {
"token_address": "0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff",
"token_id": "5",
"chain": "POLYGON",
"url": "https://moralis-proxy.komodo.earth",
"url_antispam": "https://nft.antispam.dragonhound.info"
}
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2)) const payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "refresh_nft_metadata",
"mmrpc": "2.0",
"params": {
"token_address": "0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff",
"token_id": "5",
"chain": "POLYGON",
"url": "https://moralis-proxy.komodo.earth",
"url_antispam": "https://nft.antispam.dragonhound.info"
}
};
const response = await fetch("http://127.0.0.1:7783", {
method: "POST",
body: JSON.stringify(payload),
});
console.log(await response.json()); <?php
$payload = <<<'JSON'
{
"userpass": "RPC_UserP@SSW0RD",
"method": "refresh_nft_metadata",
"mmrpc": "2.0",
"params": {
"token_address": "0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff",
"token_id": "5",
"chain": "POLYGON",
"url": "https://moralis-proxy.komodo.earth",
"url_antispam": "https://nft.antispam.dragonhound.info"
}
}
JSON;
$ch = curl_init("http://127.0.0.1:7783");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response; package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{"userpass":"RPC_UserP@SSW0RD","method":"refresh_nft_metadata","mmrpc":"2.0","params":{"token_address":"0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff","token_id":"5","chain":"POLYGON","url":"https://moralis-proxy.komodo.earth","url_antispam":"https://nft.antispam.dragonhound.info"}}`)
resp, err := http.Post("http://127.0.0.1:7783", "application/json", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
} require 'net/http'
require 'json'
require 'uri'
uri = URI("http://127.0.0.1:7783")
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "refresh_nft_metadata",
"mmrpc": "2.0",
"params": {
"token_address": "0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff",
"token_id": "5",
"chain": "POLYGON",
"url": "https://moralis-proxy.komodo.earth",
"url_antispam": "https://nft.antispam.dragonhound.info"
}
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body)) Show Response
{
"mmrpc": "2.0",
"result": null,
"id": null
} Error responses
{
"mmrpc": "2.0",
"error": "Token: token_address 0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff, token_id 5 was not found in wallet",
"error_path": "nft",
"error_trace": "nft:504]",
"error_type": "GetNftInfoError",
"error_data": {
"error_type": "TokenNotFoundInWallet",
"error_data": {
"token_address": "0x48c75fbf0452fa8ff2928ddf46b0fe7629cca2ff",
"token_id": "5"
}
},
"id": null
}