> For the complete documentation index, see [llms.txt](https://koii-network.gitbook.io/getting-started/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://koii-network.gitbook.io/getting-started/koii-software-toolkit-sdk/basic-utility-functions/nfts/getnftidsbyowner.md).

# getNftIdsByOwner

This function returns an array of strings for a list of all the NFTs owned by a given address.

### Parameters

**owner \<string>** - Wallet address of the owner for which the array of NFT IDs has to be returned.

### Example Code

{% hint style="warning" %}
In the below code example, change the `ownerAddress` to the address for which you want to see the list of NFTs.
{% endhint %}

```javascript
const knode = require("@_koi/sdk/node");
const ktools = new knode.Node();
async function testGetNftIdsByOwner() {
    const ownerAddress = "7b4ll1zwenRB8jzyESjFNcRls331buyNl231Pe0V9VI";
    const nfts = await ktools.getNftIdsByOwner(ownerAddress);
    console.log(nfts);
}

testGetNftIdsByOwner();
```

### Example Code Output

```
Initialized Koii Tools for true ownership and direct communication using version QA7AIFVx1KBBmzC7WUNhJbDsHlSJArUT0jWrhZMZPS8
[
  'KS2cPkMdex3-EehSh20InyuumshQW0flgSMtNgercPI',
  'bSTZSSoiX3LEqsacb2wRlQWw58zat9RJ8jQ8sYXo-jY',
  'gZIRmwBIL5nnkAxaFQbGICcUdrOOmBLzqd1LFhd3vSA',
  'bwk-rqZjxq9r1Ip06MBZQra_gF-pkEsQjIO7h-gwoO8',
  'rnc8IO7O7fd8Hovvvmq2YZ4y1CI-O0tdRavSGj_meYE',
  'hXe6MRSYBulaqllnmWNoMDoY-lmbTCkAOQwEZT4ZZ-s'
]
```

{% hint style="success" %}
In the above example, one of the NFT owned by the address `7b4ll1zwenRB8jzyESjFNcRls331buyNl231Pe0V9VI` is `gZIRmwBIL5nnkAxaFQbGICcUdrOOmBLzqd1LFhd3vSA` which can be [**accessed via the leaderboard**](https://koi.rocks/content-details/gZIRmwBIL5nnkAxaFQbGICcUdrOOmBLzqd1LFhd3vSA).
{% endhint %}

### Returns

**Promise\<string\[]>** - Array containing the NFTs with the address as owner address.
