Send SMS using Django-Python


  • Python
  • Django
    • 3
    • IN
    • Verified
    • Posted byProud
    • TimeAug. 14, 2022, 4:32 p.m.
    • StatusActive

    Snippet Description

    Create a separate file name it as sms_worker.py or any. Add this code to your file. Send the message by just calling the function and providing params..

    Code

      import requests

      base_url ="http://url/api/v4/?api_key=API_KEY&sender=SENDER&method=sms&"

      def otp_reg_cmd(mobile):
          sms = "Message"  # Sample-Message
          url =  base_url+"message="+sms+"&to="+mobile
          req = requests.get(url)

    Comments

    Related Posts

    Send SMS using Django-Python

    Python Django

    3 Aug. 14, 2022, 4:32 p.m.
    Proud

    Nginx 502 Bad Gateway - Django

    Nginx Python Django

    13 March 17, 2022, 3:34 p.m.
    Proud

    Django Project Updating on Server

    Nginx Python Django

    14 March 17, 2022, 2:17 p.m.
    Proud

    Want to Hire our experts?

    We'll help you to grow your career and growth.
    SignUp Today