We arrive at the final and longest snippet of our code that will connect all dots and make the previous steps more relevant to us. We partition all code contents from views.py into 3 parts.
Starting off imports, the most basic module to import is path that returns for urlpatterns. ValidatePhoneSendOTP and ValidateOTP are API view classes that subclass Django's View class. These will arrive later in Step 5: Writing Final Views part of this tutorial.
In this post, we're going to code in Python Django to use the Sparrow SMS API integration to verify a Nepali NTC/ Ncell phone number using an API as a service server-generated OTP code.