Authorization Issue with Minting a Dip 721 NFT

I was going through a tutorial on how to create an NFT on Internet Computer, but I’m stuck on this error (variant { Err = variant { Unauthorized } }), when I should be getting this result (variant { Ok = record { id = 1 : nat; token_id = 0 : nat64 } }). I think it’s an authorization problem, but I don’t know how to resolve it. Do you know what I’m doing wrong? :thinking:

This probably means that you either use the wrong identity to make mint call or that something in the authorization check went wrong. Are you trying to mint with the same identity (dfx identity whoami) with which you deploy the canister?

Hey Severin, which identity should I use to make the mint call? I want to mint using the same identity I used for deployment. By the way, when I run “dfx identity whoami” I get default. Should I be getting the root user?

default is fine, I was just wondering since the script shows alice and bob as other identities. I assume you got the code from over here? I really don’t see anything wrong. @Jessie do you notice anything?

I’m not able to reproduce the error myself. Have you tried using the demo.sh script in the example’s folder? Do you get the same error when deploying it with that script?

I got the code from there. I don’t notice anything wrong myself.

Thanks Jessie, now it works. I did “chmod +x demo.sh” and then “./demo.sh”, and it worked.