Is it possible to use either a website API or an Android APK to send SMS or OTP codes from my personal mobile number to another number, leveraging my SIM card provider’s 100 free SMS plan, without needing a USB cable, and at a low cost? Additionally, can this be implemented using Python programming language to automate the process and handle SMS sending efficiently?
user26796632 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Yes, it is possible. Some websites offer services that allow you to use your personal mobile number and your SIM card provider’s 100 free SMS plan through an API. For example, MSGP Server (https://msgpserver.com) provides APIs and code examples in languages such as Python, Django, and Android. Here is an example of Python code
This code Worked for me. You Can Try, This Code.
import requests
import socket
import json
msgp_obj = {
'mtype' : 'N', # [ 'N' = National / 'I' = International ]
'sender' : '+910987654321',
'message' : 'This is a test message...',
'auth_id' : 'Authentication_id',
'auth_key' : 'Authentication_key'
}
msgpServer_url = 'https://msgpserver.com/api/'
headers = {
'Content-Type' : 'application/json; UTF-8',
}
response = requests.post(msgpServer_url, data=json.dumps(msgp_obj), headers=headers)
if response.status_code == 200:
json_content = json.loads(response.content)
print("json_content: ", json_content)
status = ['status']
login = ['login']
recharge = ['recharge']
msg = ['msg']
else:
print("Server Down... ")
[Success Response]
json_content: {'status': 'success', 'login': 'success', 'recharge': 'success', 'host': 'success', 'msg': 'success'}
[Error Response]
json_content: {'status': 'success', 'login': 'success', 'recharge': 'success', 'host': 'error', 'msg': 'error'}
json_content: {'status': 'success', 'login': 'success', 'recharge': 'expire', 'host': 'error', 'msg': 'error'}
json_content: {'status': 'online', 'login': 'error', 'recharge': 'error', 'host': 'error', 'msg': 'error'}
user26796632 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.