Hello Raoni,
We understand your concern.
Yes, you can program this using the Advanced Nuki Web API by receiving webhooks for “Device Auth”. Of course, you need to check the webhook if a certain code was used.
For more information, please refer to the documentation.