Skip to content

Sent OTP using python both via mail & phone. You can add custom message but this is just to show how it works.

Notifications You must be signed in to change notification settings

nitinkumar30/send-otp-using-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Send OTP using python

SO, there are 2 possible ways to sent OTP:

  • Sent OTP via mail
  • Sent OTP via phone number

Sent OTP via mail

  • So, this is something hard to do. Access the file here
  • Your mail should have 2F authentication enabled & in-app passwords added.
  • First enable 2F authentication in your gmail account. Go through the process mentioned here
  • Then follow how to add app password here
  • Then you're good to go. Just add your mail id & 16-digit password generated in the space provided in the code
  • Run the code

How to run

No need to install any new library. Just run the code.
Recommended IDE is PyCharm Community

See the screenshots below for clarification

  1. How to add app passwords
  • app-pass-1
  1. How will it look after adding the password
  • app-pass-2
  1. OTP got in my mail id. So how'll it look like
  • otp-got

Sent OTP via Phone Number

So, this is something of hard too. Checkout the code here
You need to have twilio account with mail id & phone number verified. Make an account here
First go to console & copy your ACCOUNT_SID & AUTH_TOKEN. You can get them here
Then paste them in the space provided in the code
Run the code. See full documentation here

How to run

You need to install a library 'twilio'.Then just run the code.
Recommended IDE is PyCharm Community

See the screenshots below for clarification

  1. How will the output go
  • image
  1. What if you entered OTP incorrectly?
  • image

Thanks for coming till here. Please give STAR & follow me for more projects.

About

Sent OTP using python both via mail & phone. You can add custom message but this is just to show how it works.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages