Sindbad~EG File Manager

Current Path : /home/numerotech/aiosgreedingsmail.urbanedge.co.in/aios_birthday/core/library/
Upload File :
Current File : //home/numerotech/aiosgreedingsmail.urbanedge.co.in/aios_birthday/core/library/sms.py

from core import app
from flask import url_for
from datetime import datetime, date, time, timedelta
import requests,json
import urllib.parse


class SMS:
	# Usage : SMS().Send(['9952514049','8637643225'],'sms message')
	def Send(self,mobile, message):
		print("Hi this this is sms library function")

		url_sms = 'http://api.msg91.com/api/v2/sendsms'

		data = {
			"sender": "VRCOTP",
			"route": "4",
			"country": "91",
			"sms": [
				{
					"message": urllib.parse.quote_plus(message),
					"to": mobile
				}
			]
			
		}

		headers = { 

			'authkey': "231926AE3o5GFOkdM5c110b52", #MSG91 Numerotec account API Key
			'Content-Type': "application/json"
		}
		
		response = requests.request("POST", url_sms, data=json.dumps(data),  headers=headers)
		print(response)
		return('success')


# app.jinja_env.globals.update(SMS=SMS)

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists