Normally these sorts of codes are sent either as a text or an email to double check you are who you say you are.
So it might be an idea to check you've given your correct email address and/or you have data switched on on your phone to be able to receive texts; you won't be able to receive texts over wifi.
If your email address is correct and your data is switched on, then it could be a problem at their end. You may have to ring them to check they've not inadvertently either got your email address or mobile number wrong.
Please do come back if you're still experiencing problems and I've no doubt one of our members with far more technical know how than me can help.
In the meantime, welcome to the forum
Track usage, upgrade and get support with the My O2 appDownload My O2