Apple ID not letting me sign in
So I recently got a new (old) mac, and I'm trying to sign into Message and all that, but it is not letting me. I know my email and password are correct, I've tried it on another device too. It just gets to a screen that says I need to enter a verification code but there is no place to enter one. Any help?
Mac mini, OS X 10.10