I have been trying to implement a sort of One-Time phone number verification system in my android app.
I researched and discovered that outfits like twilio were offering this service, but they are all expensive to use. All i want is just a Random, Unique code that would be sent to the phone number the user supplied.
So searched some more and found this post on stackoverflow, which talks about generating unique, random alphanumeric Strings using openssl_random_pseudo_bytes($bits). But i don't know the way forward from here.
My Problems
After generating the Strings and saving them in the database. How do i send one to the user's phone number.(I imagine i would need some sort of SMS API).
How secure is this method of generating the random strings.
Thank you.