# Make NFTMinter resource publicly available to all users

**URL:** <https://forum.flow.com/t/make-nftminter-resource-publicly-available-to-all-users/2199>\
**Category:** 🏄🏻‍♀️ Cadence\
**Created:** [July 15, 2021, 5:07am UTC](https://forum.flow.com/t/make-nftminter-resource-publicly-available-to-all-users/2199 "2021-07-15T05:07:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kartik](https://avatars.discourse-cdn.com/v4/letter/k/e274bd/32.png) [@Kartik](https://forum.flow.com/u/Kartik)\
**Post date:** [July 15, 2021, 5:07am UTC](https://forum.flow.com/t/make-nftminter-resource-publicly-available-to-all-users/2199/1 "2021-07-15T05:07:39Z")

</div>

Hi all, I really need your help. I have an admin account on which the contract is deployed. It also stores the NFTMinter Resource in its storage. However, I want to borrow this minting capability for all other users i.e. the AuthAccounts who are signing the transaction, so that everyone is allowed to mint a token and not just admin.

In the contract, I have added the below code inside the init method :

self.account.link\<&NFTMinter\>(/public/NFTMinter, target: /storage/NFTMinter)

my init method of the contract now looks like :

init() {  
self.account.save(\<-self.createEmptyCollection(), to: /storage/NFTCollection)  
self.account.link\<&{NFTReceiver}\>(/public/NFTReceiver, target: /storage/NFTCollection)  
self.account.save(\<-create NFTMinter(), to: /storage/NFTMinter)  
self.account.link\<&NFTMinter\>(/public/NFTMinter, target: /storage/NFTMinter)  
}

but still when I try to sign the transaction from another user, it throws this error :

**Error**

panic: could not borrow minter reference.

How can I resolve this issue? I have referred

> **[Try out this Playground project](https://play.flow.com/44cd88ff-23c6-4564-a94f-e4b4d4e87963?type=account&id=ff51ee58-c2d0-412c-b980-95e3729721f3)**
>
> Learn Cadence, a revolutionary new smart contract programming language written for the Flow blockchain.

admin account is 0x02.

@flowjosh , @qvvg , @dh77 any help would be really appreciated. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![kimcodeashian](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/kimcodeashian/32/498_2.png) [@kimcodeashian](https://forum.flow.com/u/kimcodeashian)\
**Post date:** [July 21, 2021, 12:19am UTC](https://forum.flow.com/t/make-nftminter-resource-publicly-available-to-all-users/2199/3 "2021-07-21T00:19:09Z")

</div>

You can always give permission to an account to mint (check capability receiver pattern) [https://docs.onflow.org/cadence/design-patterns/#capability-receiver](https://docs.onflow.org/cadence/design-patterns/#capability-receiver)

---

<div class="post-metadata">

**Author:** ![Creator](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/creator/32/580_2.png) [@Creator](https://forum.flow.com/u/Creator)\
**Post date:** [July 21, 2021, 8:04am UTC](https://forum.flow.com/t/make-nftminter-resource-publicly-available-to-all-users/2199/4 "2021-07-21T08:04:44Z")

</div>

Hi @Kartik

You can not give public access to a Resource directly  
Your Ressource needs to implement an Interface then link the Interface to the Resource storage (I wrote this in a few seconds as I am on holidays, you need to adapt it but this are the principes):

```
self.account.link<&NFTMinterInterface >(/public/NFTMinterInterface , target: /storage/NFTMinter)

pub resource interface NFTMinterInterface { .... your public functions declation

pub resource NFTMinter: NFTMinterInterface { .... implement your functions

```

Kind regards
