# ERC721 get list tokens to specif user(address)

**URL:** <https://forum.openzeppelin.com/t/erc721-get-list-tokens-to-specif-user-address/26975>\
**Category:** Smart Contracts\
**Tags:** erc721\
**Created:** [March 29, 2022, 3:42pm UTC](https://forum.openzeppelin.com/t/erc721-get-list-tokens-to-specif-user-address/26975 "2022-03-29T15:42:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tablet\_Teste](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/tablet_teste/32/5540_2.png) [@Tablet\_Teste](https://forum.openzeppelin.com/u/Tablet_Teste)\
**Post date:** [March 29, 2022, 3:42pm UTC](https://forum.openzeppelin.com/t/erc721-get-list-tokens-to-specif-user-address/26975/1 "2022-03-29T15:42:42Z")

</div>

How can I retrieve all NFT from a specific user?  
Example, I want to know which tokens that user XXXXXX has.

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [April 7, 2022, 2:15am UTC](https://forum.openzeppelin.com/t/erc721-get-list-tokens-to-specif-user-address/26975/2 "2022-04-07T02:15:54Z")

</div>

See the discussion in this issue for alternatives:

> <https://github.com/OpenZeppelin/openzeppelin-contracts/issues/1102>
>
> ERC721 has no way to retrieve \_all\_ tokenIds owned by an account, such as the \`t…okensOf\` function that was at some point part of the draft but removed before becoming final. We discussed bringing that function back in https://github.com/OpenZeppelin/openzeppelin-solidity/pull/856 but decided against it.
> 
> There is a function \`tokenOfOwnerByIndex\` that allows iterating the owned tokens one by one, but this will probably result in terrible performance and also suffers race conditions.
> 
> It's not clear what is the correct way for programs, including dapps, to retrieve all of the tokens owned by an account. It would be very useful if OpenZeppelin included documentation or helpers related to this task.
> 
> There was already a few proposals in the comments of https://github.com/OpenZeppelin/openzeppelin-solidity/pull/856, which I encourage those interested to read. There was mention of events, off-chain indexing (e.g. gnarly), JSON-RPC batching (apparently a non-solution), an auxiliary querier contract (https://github.com/OpenZeppelin/openzeppelin-solidity/pull/856#issuecomment-406768864), and even using said contract via \`eth\_call\`.
> 
> We need some research done on the feasiblity of those approaches, their performance, as well as other alternatives, with the objective of making a recommendation to OpenZeppelin users and the ERC721 ecosystem in general. There may already be a solution out there that we haven't heard about!

---

<div class="post-metadata">

**Author:** ![asato](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@asato](https://forum.openzeppelin.com/u/asato)\
**Post date:** [April 7, 2022, 4:09am UTC](https://forum.openzeppelin.com/t/erc721-get-list-tokens-to-specif-user-address/26975/3 "2022-04-07T04:09:36Z")

</div>

you can use api service like moralis or quicknode
