I had a similar story - I urgently needed to get a code to access a web service, but I didn't want to give out my number. I surfed the forums and came across
receiveSMS io. It's a real find! There you can receive SMS for free, and without any logins or registrations. Just go in, choose a number, enter it during registration - and immediately see incoming SMS. It works reliably, I've been using it for a couple of months, it's especially convenient for temporary accounts or tests. It really saves when you need it quickly and without a headache.