> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getCredentialNFTFromLocator

> **getCredentialNFTFromLocator**(`locator`): `Promise`\<`object`>

Retrieves a Verifiable Credential NFT from a locator.

This function performs the following steps:

1. Parses the locator string to extract NFT details.
2. Verifies that the NFT belongs to a supported Verifiable Credentials chain.
3. Fetches the NFT's metadata and verifies it belongs to a Verifiable Credentials collection.
4. Returns the NFT and the corresponding credentials collection.

## Parameters

| Parameter | Type     | Description                                                                                                                                        |
| --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `locator` | `string` | The locator string of the credential, formatted as "chain:contractAddress:tokenId" (e.g., "polygon:0x1B887669437644aA348c518844660ef8d63bd643:1"). |

## Returns

`Promise`\<`object`>

An object containing:

* `collection`: The collection that the NFT belongs to, including the credential metadata.
* `nft`: The NFT with its metadata.

### collection

> **collection**: [`CredentialsCollection`](../interfaces/CredentialsCollection)

### nft

> **nft**: `NftWithMetadata` = `vcNft`

## Throws

Will throw an error if the NFT is not on a supported Verifiable Credentials chain or if the NFT is not associated with a Verifiable Credentials collection.

## Defined in

[verifiableCredentialsSDK/presentation/nftByLocator.ts:25](https://github.com/Crossmint/crossmint-sdk/blob/main/packages/client/verifiable-credentials/src/verifiableCredentialsSDK/presentation/nftByLocator.ts#L25)
