Autogen API : Mobile Number OTP Verification


Need an urgent help.

I want to verify user’s mobile number so I have found an API which helps me to send OTP to verify user. I have searched many videos and blogs to how to set this API yet I’m unable to set this up. Please help.

I’v installed “bubble API connector” and enterd my API key.
I’v created an Input for mobile number
Now, i dont know how to invoke Autogen Endpoint API…

following is the document shared by API provider.

Sending OTP:

  1. Display an input box ( so end user can provide his phone number )
  2. User clicks on Signup / Login button
  3. Your application invokes 2Factor’s AUTOGEN API Endpoint{api_key}/SMS/+91{user's_phone_no}/AUTOGEN

Sample response:

{ "Status": "Success", "Details": "5D6EBEE6-EC04-4776-846D"}

Details value in above response corresponds to unique OTP session id.

Verifying OTP:

  1. Ask user to input OTP received
  2. Invoke 2Factor’s VERIFY Endpoint to verify OTP entered by user{api_key}/SMS/VERIFY/{session_id}/{otp_entered_by_user}

Here session_id = Details value returned in SendOTP step

Sample Response:

{ "Status": "Success", "Details": "OTP Matched" }

If the response received from our API says ‘OTP Matched’, then you can mark the user as verified in your database Else ask user to Retry.

1 Like

Did you try something like below.
Haven’t tested it as i’m not in india so can’t register for an api key

You will do something similar for the second call for the Verify OTP

Hi @seanhoots

Thanks for your reply. I have entered the details as you guided. Can you guide me further on how to invoke endpoint query.


I don’t understand what you mean by “invoke endpoint query”.

Also I don’t think you’ve setup the api the way I showed you.
Did what you did actually work?
In what I showed you I used square brackets ( [ ]) in URL not curly brackets ( { } ).
When you use the square brackets this will automatically create new url parameter fields.
In what you did I see that you manually entered header parameters.

This topic was automatically closed after 70 days. New replies are no longer allowed.