1
import way2sms
import requests

q=way2sms.sms('Arjun','xyz')
q.send(9418403783,'Yo their I am arjun')
n=q.msgSentToday()
q.logout()

And I am getting the following error when I run the command. , I have all the required modules installed but facing an error.

Traceback (most recent call last): File "C:/Users/my dell/AppData/Local/Programs/Python/Python36- 32/records/smssend.py", line 4, in q=way2sms.sms('Arjun','M9329G') File "C:\Users\my dell\AppData\Local\Programs\Python\Python36- 32\lib\way2sms.py", line 17, in init self.s=requests.Session() # Session because we want to maintain the cookies AttributeError: module 'requests' has no attribute 'Session'

Tim Hutchison
  • 3,483
  • 9
  • 40
  • 76
Bing
  • 61
  • 6

2 Answers2

1

Sending SMS work properly .Try this .

import requests
import json

URL = 'http://www.way2sms.com/api/v1/sendCampaign'
def sendPostRequest(reqUrl):
  req_params = {
  'apikey':'key',
  'secret':'secret',
  'usetype':'stage',
  'phone': 'phone',
  'message':'Hello ',
  }
4b0
  • 21,981
  • 30
  • 95
  • 142
-1

You can use the official API of way2sms from their website. It is a 100% working solution for free test keys. For details, see my answer at- Sending SMS using Python via way2sms

Bukaida
  • 225
  • 2
  • 6
  • 15