Skip to content

Latest commit

 

History

History
83 lines (72 loc) · 2.04 KB

README.md

File metadata and controls

83 lines (72 loc) · 2.04 KB

ghasedak-kavenegar-python

If you need to future information about API document Please visit RESTful Document

Installation

You can install our SDK from pypi through below command

pip install ghasedakkavenegar

You can download the Python SDK Here too

Then ,You need to make an account on Ghasedak from Here

After that you just need to pick API-KEY up from your panel.

Anyway there is good tutorial about Pull request

Usage

Send

from ghasedakkavenegar import *
try:
    api = KavenegarAPI('Your APIKey', timeout=20)
    params = {
        'sender': '',#optional
        'receptor': '',#multiple mobile number, split by comma
        'message': '',
    } 
    response = api.sms_send(params)
    print(response)
except APIException as e: 
    print(e)
except HTTPException as e: 
    print(e)

OTP

#!/usr/bin/env python
from ghasedakkavenegar import *
try:
    api = KavenegarAPI('Your APIKey', timeout=20)
    params = {
        'receptor': '',
        'template': '',
        'token': '',
        'type': 'sms',#sms vs call
    }   
  response = api.verify_lookup(params)
  print(response)
except APIException as e: 
  print(e)
except HTTPException as e: 
  print(e)

Send Bulk

#!/usr/bin/env python
from ghasedakkavenegar import *
try:
    api = KavenegarAPI('Your APIKey', timeout=20)
    params = {
        'sender':'["",""]',#array of string as json 
        'receptor': '["",""]',#array of string as json 
        'message': '["",""]',#array of string as json 
    } 
    response = api.sms_sendarray(params)
    print(response)
except APIException as e: 
    print(e)
except HTTPException as e: 
    print(e)

Contribution

Bug fixes, docs, and enhancements welcome! Please let us know [email protected]