Skip to content

OTP verification with Twillo with simple MVC architecture | code written in Golang Simple Package |

Notifications You must be signed in to change notification settings

abhinandpn/twilloOTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OTP verification with Twilio and Golang


Otp verification with twillio using gin frame workd in golang

Structure of code

  • api (structuring our API-related files)
  • cmd (structuring our application entry point)
  • data (structuring our application data)

create a .env file and load this variable

 TWILIO_ACCOUNT_SID = "your Twilio account sid"
 TWILIO_AUTHTOKEN = "your twilio account authtoken"
 TWILIO_SERVICES_ID = "youw twilio account service id"

Api Request Format


You can edit the Port and domain

Api Url : = http://localhost:8080/otp

{
  "PhoneNumber":"enter your number with country code"
}

Api Url : = http://localhost:8080/verifyOTP

{
  "user":{
    "PhoneNumber":"enter your number with country code"
  },
    "code":"enter your OTP"
}

About

OTP verification with Twillo with simple MVC architecture | code written in Golang Simple Package |

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages