2023-09-23 12:43:44 +07:00
2023-09-23 03:42:36 +07:00
2023-09-07 22:44:34 +07:00
2023-09-08 23:46:49 +07:00
2023-09-09 21:52:05 +07:00
2023-09-23 12:43:44 +07:00
2023-09-23 12:43:44 +07:00

OTP with meme image

Idk why i made this. A REST API that sends a one-time authentication code (a.k.a OTP) to email, but the code is in the text of a meme image. One of the projects that gives me a break from schoolwork

Usage

Packages required:

  • flask
  • python-dotenv

Setup:

  • Create a new .env file
  • Add your EMAIL_SENDER and EMAIL_PASSWORD in your .env file
  • Optional:
    • By default I use gmail for email host, you can configure your HOST in the .env file.
    • You can also add PORT in .env
  • Create or use an API test app like Postman

Usage:

  • Run main.py

  • Send a request to http://localhost:5000/send-otp with your email query as email recipient. E.g: http://localhost:5000/send-otp?email=your@email.com.

  • If successful then a response appears like this:

    {
        "email": {
            "body": "Here's your email confirmation",
            "receiver": "your.receiver@email.com",
            "sender": "your.sender@email.com",
            "subject": "confirm your account"
        },
        "message": "Success sending email",
        "status": 200
    }
    
  • Now if you look at the recipient's email, it will be the image that was sent, for example:

    Example Output 1 Example Output 2

Why this meme?

The meme used in this project is Shannon Smiling or better known as The Guy Smiling And Wearing A Suit, which is often paired with a negative text or "My Reaction For That Information".

Guy with suit

the reason why I chose this meme was inspired by a meme where a man screenshot the OTP sender's chat and he replied by sending a photo of himself posing cool. suddenly it gave me the idea to make an OTP system by sending pictures of people posing cool with the OTP code text.

Idk why I chose the photo of Shannon smiling, it's because I think with the meme photo of Shannon in addition to making a sense of humor but also as a sign of welcome and strengthens security.

Description
A simple REST API that sends a one-time verification code (a.k.a OTP) to email, but the code is in the text of image.
Readme MIT 4 MiB
Languages
Python 100%