Search code examples
phpsmstwilioverificationphone-number

Twilio verify phone through SMS PHP application


I'm trying to build a "simple" phone verification function in PHP that takes a phone number from a form, sends a SMS to user to check if the number is real and theirs.

I'm in desperate need of some tutorials or any piece of information to guide me to accomplish this.

I found this, but I dont seem to manage further in building something.


Solution

  • Twilio developer evangelist here.

    Authy is our API that deals with phone number verification.

    Check out the documentation for the Authy PHP library and the bits on phone verification.

    I recommend that you try building something before asking more questions on SO. Start with a form in which you can get a user to input their phone number and then read that phone number on the survey. Then get yourself a free Twilio/Authy account and try to install the Authy PHP library. Then make the request to the Authy API to start a phone verification and build a form to take the user's response and submit to a new PHP file that reads their response and uses the Authy API to check the code they enter.

    If you get stuck at any of those points, then come back to Stack Overflow and ask a specific question about where you are stuck.

    That's about as much as I can help with right now. Hope it goes well for you. If you do have questions and you tag them twilio or authy then I will likely see and be able to help.