Please excuse our look. We're just getting started here.

Want to learn more about Twilio Forums? Check out our FAQ page here.

Front end noob questions

Hi there,

I have some stupid questions. Please bare with me, i'll keep it short.

I need a system that will allow users to login / verify there account so there is one account per phone number of user, this will stop users making 100 accounts... Is your 'verify' service the answer to this problem?

I don't know much backend so your 'serverless verify' systems seems to be a good solution, is this right or should I build this into my backend systems?

If a front end serverless API type approach is best, where can I find a current guide for this. Your docs are great but so extensive. I don't have the time to deep dive on everything. I see alot of blog posts and youtube content but I cant seem to find the right guide, or maybe some have prerequisite guides i have missed by accident (for example login via CLI, do i need that?). I'm very confused after an entire day of learning Twilio to be honest.

I was expecting to send you 1 API call with a phone number string, which would return the verification number for my front end logic.... Am I being stupid?

any help would be greatly appreciated, sorry to take up your time with my stupid questions

kind regards
Bill

Answers

  • Hey Bill - Kelley here, I'm the Developer Evangelist at Twilio who wrote the serverless Verify code sample.

    Verify is exactly what you want to keep your customers from creating 100 accounts each so you found the right product. Here's the blog post I think you want:

    https://www.twilio.com/blog/serverless-phone-verification

    More context below...

    I was expecting to send you 1 API call with a phone number string, which would return the verification number for my front end logic

    This is a completely fair expectation but isn't quite how the Verify API works: we never give you the developer the one-time passcode (OTP), that's only sent to the phone number you provide in the API request (step 2 below). It was a design decision to decrease the number of people who would have access to the OTP.

    There are 3 steps to use the Verify API

    1. Create a Verify Service. You only need to create this once and can create one in the console.
    2. Send a Verification Code. You can either embed the code to do this in a serverless function like I shared above OR embed the code into your existing application (this is useful if you're already exposing API endpoints with a Python or Ruby or PHP server, for example). More details/code sample.
    3. Check a Verification Code. Instead of comparing the code in your front end, you'll make a 2nd API request to check the verification code the user provides. This actually makes the code simpler for you since you don't have to track/store the verification code sent to the user or manage time outs or rate limiting. More details/code sample.

    Thanks for your question and hopefully that provides some clarity.

If this is an emergency, please contact Twilio Support. This is not an official Support channel. https://support.twilio.com/
Have an urgent question?
Please contact Twilio Support. This is not an official Support channel.
Contact Support