# tokens.getToken

```javascript
(async() => {
    let token_info_1 = await SOLPay.tokens.getToken("TOKEN_ADDRESS"); // {...}
    let token_info_2 = await SOLPay.tokens.getToken("TOKEN_ADDRESS", true); // {...}
})();
```

### Parameters:

* address: string - the mint address of the token with which to get the info from the SPL token registry
* skip\_validation (optional, default: `false`): boolean - whether to skip validation on if a token in the SPL token registry is a valid SPL token (true for skipping validation, false for not skipping validation)

### Returns:

object (`{...}`) - the token information (see <https://github.com/solana-labs/token-list/blob/main/src/tokens/solana.tokenlist.json> for format)

### Throws:

* `SOL Pay SDK Fatal Error: Invalid address ${address}.` - an invalid address was used
* `SOL Pay SDK Fatal Error: No connection found. Use SOLPay.connectNetwork() to connect to the Solana network.` - could not find a connection to the Solana network
* `SOL Pay SDK Fatal Error: Connection did not respond. Use SOLPay.connectNetwork() to connect to the Solana network.` - did not receive response from Solana network


---

# 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://solpay-docs.solblaze.org/reference/sdk-reference/tokens-get-token.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.
