Skip to content

getTokenDetails

The getTokenDetails function returns data required to view an NFT

Before using them, make sure to obtain a Client API Key from Coinbase Developer Platform.

Usage

code
import { setOnchainKitConfig } from '@coinbase/onchainkit';
import { getTokenDetails } from '@coinbase/onchainkit/api';
 
const response = await getTokenDetails({
  contractAddress: '0x...',
  tokenId: '1',
});

Returns

Promise<GetTokenDetailsResponse>

Parameters

GetTokenDetailsParams