# In https://github.com/onflow/flow-nft/ can not get NFT metadata

**URL:** <https://forum.flow.com/t/in-https-github-com-onflow-flow-nft-can-not-get-nft-metadata/2455>\
**Category:** 🏄🏻‍♀️ Cadence\
**Created:** [October 11, 2021, 4:28am UTC](https://forum.flow.com/t/in-https-github-com-onflow-flow-nft-can-not-get-nft-metadata/2455 "2021-10-11T04:28:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![qifufu](https://avatars.discourse-cdn.com/v4/letter/q/ea5d25/32.png) [@qifufu](https://forum.flow.com/u/qifufu)\
**Post date:** [October 11, 2021, 4:28am UTC](https://forum.flow.com/t/in-https-github-com-onflow-flow-nft-can-not-get-nft-metadata/2455/1 "2021-10-11T04:28:22Z")

</div>

value of type `&NonFungibleToken.NFT` has no member `metadata`. unknown member

I can’t cast NonFungibleToken.NFT as ExampleToken.NFT  
mismatched types. expected `&ExampleNFT.NFT`, got `&NonFungibleToken.NFT`

---

<div class="post-metadata">

**Author:** ![flowjosh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/flowjosh/32/362_2.png) [@flowjosh](https://forum.flow.com/u/flowjosh)\
**Post date:** [October 12, 2021, 7:54pm UTC](https://forum.flow.com/t/in-https-github-com-onflow-flow-nft-can-not-get-nft-metadata/2455/2 "2021-10-12T19:54:35Z")

</div>

This is because the reference that is returned is the type `&NonFungibleToken.NFT`. References cannot be cast to the concrete type unless they are authorized references. If you want to get a full reference to your NFT so you can get the metadata field from it, you need to have a special function to return the reference, kind of like in the TopShot contract: [https://github.com/dapperlabs/nba-smart-contracts/blob/master/contracts/TopShot.cdc#L652-L669](https://github.com/dapperlabs/nba-smart-contracts/blob/master/contracts/TopShot.cdc#L652-L669)
