# Managing token metadata

Token Metadata can be added / updated and removed as key / value pairs

### Retrieving Metadata&#x20;

```rust

println!("\n1. Get Token Metadata");
    println!("=====================");

    let token_info = match client.get_token_metadata(token_address).await {
        Ok(mint_info) => {
            println!("{}", mint_info);
            Some(mint_info)
        }
        Err(e) => {
            print_detailed_error("Could not get token metadata", &e);
            None
        }
    };
```

### Updating Metadata

```rust
// 9. Update token metadata
    println!("\n9. Update Token Metadata");
    println!("========================");

    let metadata_payload = TokenMetadataUpdatePayload {
        chain_id,
        nonce: current_nonce,
        name: "Updated Test Token".to_string(),
        uri: "https://example.com/updated-metadata.json".to_string(),
        additional_metadata: vec![MetadataKVPair {
            key: "version".to_string(),
            value: "2.0".to_string(),
        }],
        token: token_address,
    };

    match client
        .update_token_metadata(metadata_payload, private_key)
        .await
    {
        Ok(response) => {
            println!("Metadata updated - Tx: {}", response.hash);
        }
        Err(e) => {
            print_detailed_error("Could not update token metadata", &e);
        }
    }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.1moneynetwork.com/integrations/sdks/rust/methods/token-operations/managing-token-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
