aio-kavenegar
Kavenegar RESTful API Document
If you need to future information about API document Please visit RESTful Document
Caution !
This repository IS NOT AN OFFICIAL KAVENEGAR CLIENT!
This project is not compatible with the official package.
The original repository can be fount Here.
Installation
You can install our SDK from pypi through below command
pip install aio-kavenegar
You can download the Python SDK Here too
Then ,You need to make an account on Kavenegar from Here
After that you just need to pick API-KEY up from My Account section.
Anyway there is good tutorial about Pull request
Usage
Well, There is an example to Send SMS by Python below. timeout
parameter is optional in AIOKavenegarAPI
constructor, default value is set to 10 seconds.
Send
#!/usr/bin/env python
import asyncio
from aio_kavenegar import AIOKavenegarAPI, APIException, HTTPException
async def main():
try:
api = AIOKavenegarAPI('Your APIKey', timeout=20)
params = {
'sender': '',#optional
'receptor': '',#multiple mobile number, split by comma
'message': '',
}
response = await api.sms_send(params)
print(response)
except APIException as e:
print(e)
except HTTPException as e:
print(e)
if __name__ == "__main__":
asyncio.run(main())
OTP
#!/usr/bin/env python
import asyncio
from aio_kavenegar import AIOKavenegarAPI, APIException, HTTPException
async def main():
try:
api = AIOKavenegarAPI('Your APIKey', timeout=20)
params = {
'receptor': '',
'template': '',
'token': '',
'type': 'sms',#sms vs call
}
response = await api.verify_lookup(params)
print(response)
except APIException as e:
print(e)
except HTTPException as e:
print(e)
if __name__ == "__main__":
asyncio.run(main())
Send Bulk
#!/usr/bin/env python
import asyncio
from aio_kavenegar import AIOKavenegarAPI, APIException, HTTPException
async def main():
try:
api = AIOKavenegarAPI('Your APIKey', timeout=20)
params = {
'sender':'["",""]',#array of string as json
'receptor': '["",""]',#array of string as json
'message': '["",""]',#array of string as json
}
response = await api.sms_sendarray(params)
print(response)
except APIException as e:
print(e)
except HTTPException as e:
print(e)
if __name__ == "__main__":
asyncio.run(main())
Contribution
Bug fixes, docs, and enhancements welcome! Please let us know support@kavenegar.com
توجه !
این یک نسخه رسمی کلاینت کاوه نگار نیست!
این پروژه با پکیج رسمی کاوه نگار سازگار نیست.
کلاینت رسمی را می توانید در اینجا مشاهده کنید.
راهنما
معرفی سرویس کاوه نگار
کاوه نگار یک وب سرویس ارسال و دریافت پیامک و تماس صوتی است که به راحتی میتوانید از آن استفاده نمایید.
ساخت حساب کاربری
اگر در وب سرویس کاوه نگار عضو نیستید میتوانید از لینک عضویت ثبت نام و اکانت آزمایشی برای تست API دریافت نمایید.
مستندات
برای مشاهده اطلاعات کامل مستندات وب سرویس پیامک به صفحه مستندات وب سرویس مراجعه نمایید.
راهنمای فارسی
در صورتی که مایل هستید راهنمای فارسی کیت توسعه کاوه نگار را مطالعه کنید به صفحه کد ارسال پیامک مراجعه نمایید.
اطالاعات بیشتر
برای مطالعه بیشتر به صفحه معرفی وب سرویس اس ام اس کاوه نگار مراجعه نمایید .
اگر در استفاده از کیت های سرویس کاوه نگار مشکلی یا پیشنهادی داشتید ما را با یک Pull Request یا ارسال ایمیل به support@kavenegar.com خوشحال کنید.