ATM problems


I tried to withdraw money in 3 different ATM in Portugal and every time it asked me a 12 digit code. I look in app section card " View Pin Code" but this option gives me my pin code for use app ( 4 digits). Where can I find the right code?
I tried to buy something in a local supermarket and i didn’t have any problem in fact my app send me a notification because I had just activated my card.
Can anyone help me?