I keep getting this error:
Error! It looks like we've temporarily run out of gift codes for Minecraft for Windows 10. Don't worry though, more codes should be on their way. Please check back later!
How long do I wait for this? What can I do?
As the error suggests, you will likely just have to wait for time being. You can also try contacting Mojang support which was suggested in the forum posts. During the holiday season, I can understand how they ran out of codes. That being said, I do find it rather odd that there was a limited amount.