PyOTP extension for DRF (Django Rest Framework) !

  • This library uses PyOTP library for generating and verifying one-time passwords.Here OTP generation and Verification is done via DRF APIs.
  • The main focus is to open an API for OTP Generation & Verification.


pip install drf-pyotp


  • Add rest_pyotp app in your installed apps:

  • Run migrations using:

    python migrate
  • Add Urls in your url file:

    url(r'', include('rest_pyotp.routers', namespace='rest-pyotp-urls')),


  • I have used swagger-spec for documenting APIs. You can find out APIs swagger docs here


  • If anyone wish to contribute in improving this library then he is most welcome, due credit will be given to every individual.

Indices and tables