وب سرویس پیام کوتاه قاصدک

ارسال تکی

از این متد برای ارسال پیامک به صورت تکی و ساده استفاده می شود.

آدرس وب سرویس

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
message string
Required
متنی که باید ارسال شود .
receptor string
Required
شماره گیرنده پیام می باشد .
linenumber string
Required
شماره فرستنده پیام می باشد ، که اگر قید نشود از بین خطوط اختصاصی شما خط با اولویت بالاتر انتخاب می شود.

(در سرویس رایگان جهت تست از خط 30005088 به عنوان خط فرستنده استفاده کنید )

senddate string تاریخ و زمان دقیق ارسال پیام بر اساس Unixtime می باشد که اگر قید نشود در همان لحظه پیام ارسال می شود . (1508144471)
checkid string برای تعیین شماره ای یکتا از طرف کاربر برای هر پیامک به کار می رود و پس از ارسال پیامک می توان با متد staus کلیه اطلاعات پیام ارسال شده را دریافت کرد .

نمونه کد

                                                            
                                                        var client = new RestClient("https://api.ghasedak.me/v2/sms/send/simple");
                                                        var request = new RestRequest(Method.POST);
                                                        request.AddHeader("apikey" ," your apikey " );
                                                        request.AddParameter( "message" , " test " );
                                                        request.AddParameter("senddate", " 1508144471 ");
                                                        request.AddParameter("linenumber", " 5000222 " );
                                                        request.AddParameter( "receptor" , " 09111111111 " );
                                                        request.AddParameter( "checkid" , " 2020 " );
                                                        IRestResponse response = client.Execute(request);
                                                        
                                                    
 
                                                            
                                                                $curl = curl_init();
                                                                curl_setopt_array($curl, array(
                                                                    CURLOPT_URL => "https://api.ghasedak.me/v2/sms/send/simple",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => "message=test&receptor=09111111111&linenumber=5000222&senddate=1508144471&checkid=1",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey ",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                ));
                                                                $response = curl_exec($curl);
                                                                $err = curl_error($curl);
                                                                curl_close($curl);

                                                                if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                } else {
                                                                    echo $response;
                                                                }
                                                            
                                                        
 
                                                            
                                                                OkHttpClient client = new OkHttpClient();

                                                                MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                RequestBody body = RequestBody.create(mediaType, "message=test&receptor=09111111111&linenumber=5000222&senddate=1508144471&checkid=1");
                                                                Request request = new Request.Builder()
                                                                .url("https://api.ghasedak.me/v2/sms/send/simple")
                                                                .post(body)
                                                                .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                .addHeader("apikey", "your apikey")
                                                                .addHeader("cache-control", "no-cache")
                                                                .build();

                                                                Response response = client.newCall(request).execute();
                                                            
                                                        
 
                                                            
                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/sms/send/simple',
                                                                    headers:
                                                                    {
                                                                        'cache-control': 'no-cache',
                                                                        apikey: ' your apikey ',
                                                                        'content-type': 'application/x-www-form-urlencoded' },
                                                                    form:
                                                                    {
                                                                        message: 'test',
                                                                        receptor: '09111111111',
                                                                        senddate: '1508144471',
                                                                        checkid: '1'
                                                                    }
                                                                    };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                      console.log(body);
                                                                    });

                                                                
                                                        
 
                                                            
                                                                import http.client

                                                                conn = http.client.HTTPSConnection("api.ghasedak.me")

                                                                payload = "message=test&receptor=09111111111&linenumber=5000222&&senddate=1508144471&checkid=1"

                                                                headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "'your apikey",
                                                                    'cache-control': "no-cache",
                                                                }

                                                                conn.request("POST", "/v2/sms/send/simple", payload, headers)

                                                                res = conn.getresponse()
                                                                data = res.read()

                                                                print(data.decode("utf-8"))

                                                            
                                                        
 
                                                            

                                                                package main

                                                                import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                )

                                                                func main() {

                                                                    url := "https://api.ghasedak.me/v2/sms/send/simple"

                                                                    payload := strings.NewReader("message=test&receptor=09111111111&linenumber=5000222&senddate=1508144471&checkid=1")

                                                                    req, _ := http.NewRequest("POST", url, payload)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))
                                                                }


                                                            
                                                        
 
                                                            
                                                                curl -X POST \
                                                                https://api.ghasedak.me/v2/sms/send/simple \
                                                                -H 'apikey: your apikey' \
                                                                -H 'cache-control: no-cache' \
                                                                -H 'content-type: application/x-www-form-urlencoded' \
                                                                -d 'message=message=test&receptor=09111111111&linenumber=5000222&senddate=1508144471&checkid=1'
                                                            
                                                        
                                                            
                                                                {
                                                                    "result": {
                                                                    "code": 200,
                                                                    "message": "success"
                                                                },
                                                                    "items": [
                                                                        2578793735
                                                                    ]
                                                                }
                                                            
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"receptor is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        

جدول موارد خطا

کد خطا توضیحات
1 نام کاربری یا رمز عبور معتبر نمی باشد .
2 آرایه ها خالی می باشد.
3 طول آرایه بیشتر از 100 می باشد .
4 طول آرایه ی فرستنده و گیرنده و متن پیام با یکدیگر تطابق ندارد .
5 امکان گرفتن پیام جدید وجود ندارد .
6 - حساب کاربری غیر فعال می باشد.
- نام کاربری و یا رمز عبور خود را به درستی وارد نمی کنید .
7 امکان دسترسی به خط مورد نظر وجود ندارد .
8 شماره گیرنده نامعتبر است .
9 حساب اعتبار ریالی مورد نیاز را دارا نمی باشد.
10 خطایی در سیستم رخ داده است . دوباره سعی کنید .
11 نامعتبر می باشد . IP
20 شماره مخاطب فیلتر شده می باشد.
21 ارتباط با سرویس دهنده قطع می باشد.
24 امکان استفاده از این سرویس در پلن رایگان وجود ندارد.

ارسال تکی GET

از این متد برای ارسال پیامک به صورت GET برای ارسال تکی و ساده استفاده می شود. در مواردی که محدودیت ارسال به صورت POST وجود دارد می توانید از این متد استفاده کنید . لطفا دقت کنید در این نوع ارسال تمامی مقادیر در Body به صورت GET فراخوانی می شود .

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Body
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
message string
Required
متنی که باید ارسال شود .
receptor string
Required
شماره گیرنده پیام می باشد .
linenumber string
Required
شماره فرستنده پیام می باشد ، که اگر قید نشود از بین خطوط اختصاصی شما خط با اولویت بالاتر انتخاب می شود.

(در سرویس رایگان جهت تست از خط 30005088 به عنوان خط فرستنده استفاده کنید )

senddate string تاریخ و زمان دقیق ارسال پیام بر اساس Unixtime می باشد که اگر قید نشود در همان لحظه پیام ارسال می شود . (1508144471)
checkid string برای تعیین شماره ای یکتا از طرف کاربر برای هر پیامک به کار می رود و پس از ارسال پیامک می توان با متد staus کلیه اطلاعات پیام ارسال شده را دریافت کرد .

نمونه کد

                                                                
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/sms/send/simple/url");
                                                                    var request = new RestRequest(Method.Get);
                                                                    request.AddParameter("apikey" ," your apikey " );
                                                                    request.AddParameter( "message" , " test " );
                                                                    request.AddParameter("senddate", " 1508144471 ");
                                                                    request.AddParameter("linenumber", " 5000222 " );
                                                                    request.AddParameter( "receptor" , " 09111111111 " );
                                                                    request.AddParameter( "checkid" , " 2020 " );
                                                                    IRestResponse response = client.Execute(request);
                                                                
                                   
 
                                                                
                                                                     'https://api.ghasedak.me/v2/sms/send/simple/url',
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => '',
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 0,
                                                                    CURLOPT_FOLLOWLOCATION => true,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => 'GET',
                                                                    CURLOPT_POSTFIELDS => array('receptor' => '09111111111','message' => 'test','apikey' => 'your apikey','linenumber' => '5000222'),
                                                                    ));

                                                                    $response = curl_exec($curl);

                                                                    curl_close($curl);
                                                                    echo $response;


                                                                
                                       
 
                                                                
                                                                    OkHttpClient client = new OkHttpClient().newBuilder()
                                                                    .build();
                                                                    MediaType mediaType = MediaType.parse("text/plain");
                                                                    RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
                                                                    .addFormDataPart("receptor","09111111111")
                                                                    .addFormDataPart("message","test")
                                                                    .addFormDataPart("apikey","your apikey")
                                                                    .addFormDataPart("linenumber","5000222")
                                                                    .build();
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/sms/send/simple/url")
                                                                    .method("GET", body)
                                                                    .build();
                                                                    Response response = client.newCall(request).execute();



                                                                
                                       
 
                                                                

                                                                    var request = require('request');
                                                                    var options = {
                                                                    'method': 'GET',
                                                                    'url': 'https://api.ghasedak.me/v2/sms/send/simple/url',
                                                                    'headers': {
                                                                    },
                                                                    formData: {
                                                                    'receptor': '09111111111',
                                                                    'message': 'test',
                                                                    'apikey': 'your apikey',
                                                                    'linenumber': '5000222'
                                                                    }
                                                                    };
                                                                    request(options, function (error, response) {
                                                                    if (error) throw new Error(error);
                                                                    console.log(response.body);
                                                                    });


                                                                
                                       
 
                                                                
                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/sms/send/simple/url"

                                                                    payload = {'receptor': '09111111111',
                                                                    'message': 'test',
                                                                    'apikey': 'your apikey',
                                                                    'linenumber': '5000222'}
                                                                    files=[

                                                                    ]
                                                                    headers = {}

                                                                    response = requests.request("GET", url, headers=headers, data=payload, files=files)

                                                                    print(response.text)


                                                                
                                       
 
                                                                

                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "bytes"
                                                                    "mime/multipart"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/sms/send/simple/url"
                                                                    method := "GET"

                                                                    payload := &bytes.Buffer{}
                                                                    writer := multipart.NewWriter(payload)
                                                                    _ = writer.WriteField("receptor", "09111111111")
                                                                    _ = writer.WriteField("message", "test")
                                                                    _ = writer.WriteField("apikey", "your apikey")
                                                                    _ = writer.WriteField("linenumber", "5000222")
                                                                    err := writer.Close()
                                                                    if err != nil {
                                                                    fmt.Println(err)
                                                                    return
                                                                    }


                                                                    client := &http.Client {
                                                                    }
                                                                    req, err := http.NewRequest(method, url, payload)

                                                                    if err != nil {
                                                                    fmt.Println(err)
                                                                    return
                                                                    }
                                                                    req.Header.Set("Content-Type", writer.FormDataContentType())
                                                                    res, err := client.Do(req)
                                                                    if err != nil {
                                                                    fmt.Println(err)
                                                                    return
                                                                    }
                                                                    defer res.Body.Close()

                                                                    body, err := ioutil.ReadAll(res.Body)
                                                                    if err != nil {
                                                                    fmt.Println(err)
                                                                    return
                                                                    }
                                                                    fmt.Println(string(body))
                                                                    }


                                                                
                                       
 
                                                                
                                                                    curl --location --request GET 'https://api.ghasedak.me/v2/sms/send/simple/url' \
                                                                    --form 'receptor="09111111111"' \
                                                                    --form 'message="test"' \
                                                                    --form 'apikey="your apikey"' \
                                                                    --form 'linenumber="5000222"'
                                                                
                                       
                                                            
                                               {
                                                   "result": {
                                                   "code": 200,
                                                   "message": "success"
                                               },
                                                   "items": [
                                                       2578793735
                                                   ]
                                               }
                                           
                                   
 
                                                            
                                               {
                                                   "result": {
                                                       "code": 400,
                                                       "message": "[\"receptor is required\"]"
                                                   },
                                                   "items": null
                                               }
                                           
                                       
 
                                                            
                                               {
                                                   "result": {
                                                       "code": 401,
                                                       "message": "apikey is invalid"
                                               },
                                                   "items": null
                                               }
                                           
                                       
 
                                                            
                                               {
                                                   "result": {
                                                       "code": 404,
                                                       "message": "the requested resource does not exist"
                                               },
                                                   "items": ""
                                               }
                                           
                                       

جدول موارد خطا

کد خطا توضیحات
1 نام کاربری یا رمز عبور معتبر نمی باشد .
2 آرایه ها خالی می باشد.
3 طول آرایه بیشتر از 100 می باشد .
4 طول آرایه ی فرستنده و گیرنده و متن پیام با یکدیگر تطابق ندارد .
5 امکان گرفتن پیام جدید وجود ندارد .
6 - حساب کاربری غیر فعال می باشد.
- نام کاربری و یا رمز عبور خود را به درستی وارد نمی کنید .
7 امکان دسترسی به خط مورد نظر وجود ندارد .
8 شماره گیرنده نامعتبر است .
9 حساب اعتبار ریالی مورد نیاز را دارا نمی باشد.
10 خطایی در سیستم رخ داده است . دوباره سعی کنید .
11 نامعتبر می باشد . IP
20 شماره مخاطب فیلتر شده می باشد.
21 ارتباط با سرویس دهنده قطع می باشد.
24 امکان استفاده از این سرویس در پلن رایگان وجود ندارد.

ارسال گروهی

از این متد برای ارسال پیامک به صورت گروهی با متون مختلف و شماره فرستندگان و گیرندگان مختلف استفاده می شود.

آدرس وب سرویس

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
message string
Required
متونی که باید ارسال شوند که با ( , ) از هم جدا می شوند . (..,test1,test2)
receptor string
Required
شماره گیرندگان پیام که با ( , ) از هم جدا می شوند . (..,09121111111,09122222222)
linenumber string
Required
شماره فرستندگان پیام که با ( , ) از هم جدا می شوند . (..,5000110,5000100)
senddate string تاریخ و زمان دقیق ارسال پیام بر اساس Unixtime که با ( , ) از هم جدا می شوند که اگر قید نشود در همان لحظه پیام ارسال می شود . (..,1508144471,1508144471)
checkid string برای تعیین شماره ای یکتا از طرف کاربر برای هر پیامک به کار می رود که با ( , ) از هم جدا می شوند و پس از ارسال پیامک می توان با متد staus کلیه اطلاعات پیام ارسال شده را دریافت کرد .

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/sms/send/bulk");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "message" , " test1 , test2 " );
                                                                    request.AddParameter("senddate", " 1508144471 , 1508144475 ");
                                                                    request.AddParameter("linenumber", " 5000222 , 5000222 " );
                                                                    request.AddParameter( "receptor" , " 09111111111 , 09111111112 " );
                                                                    request.AddParameter( "checkid" , " 2020 , 2021 " );
                                                                    IRestResponse response = client.Execute(request);
                                                                
                                                    
 
                                                            
                                                                     "https://api.ghasedak.me/v2/sms/send/bulk",
                                                                        CURLOPT_RETURNTRANSFER => true,
                                                                        CURLOPT_ENCODING => "",
                                                                        CURLOPT_MAXREDIRS => 10,
                                                                        CURLOPT_TIMEOUT => 30,
                                                                        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                        CURLOPT_CUSTOMREQUEST => "POST",
                                                                        CURLOPT_POSTFIELDS => "message=test%20%D8%test&receptor=09111111111%2C09111111111&senddate=1508144471%2C1508144471&linenumber=5000222%2C5000222&checkid=1%2C2",
                                                                        CURLOPT_HTTPHEADER => array(
                                                                            "apikey:  your apikey",
                                                                            "cache-control: no-cache",
                                                                            "content-type: application/x-www-form-urlencoded",
                                                                            ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                        echo "cURL Error #:" . $err;
                                                                    } else {
                                                                        echo $response;
                                                                    }

                                                                
                                                        
 
                                                            
                                                                OkHttpClient client = new OkHttpClient();

                                                                MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                RequestBody body = RequestBody.create(mediaType, "message=test&receptor=09111111111&linenumber=5000222&senddate=1508144471&checkid=1");
                                                                Request request = new Request.Builder()
                                                                .url("https://api.ghasedak.me/v2/sms/send/simple")
                                                                .post(body)
                                                                .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                .addHeader("apikey", "your apikey")
                                                                .addHeader("cache-control", "no-cache")
                                                                .build();

                                                                Response response = client.newCall(request).execute();
                                                            
                                                        
 
                                                            
                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/sms/send/bulk',
                                                                    headers:
                                                                    {
                                                                        'cache-control': 'no-cache',
                                                                        apikey: 'your apikey',
                                                                        'content-type': 'application/x-www-form-urlencoded'
                                                                    },
                                                                    form:
                                                                        {
                                                                            message: 'test.test',
                                                                            receptor: '09111111111,09111111111',
                                                                            linenumber: '5000222','5000222'
                                                                            checkid: '1,2'
                                                                        }
                                                                    };

                                                                    request(options, function (error, response, body) {
                                                                      if (error) throw new Error(error);

                                                                      console.log(body);
                                                                    });


                                                                 
                                                                
                                                        
 
                                                            
                                                                    import http.client

                                                                    conn = http.client.HTTPSConnection("api.ghasedak.me")
                                                                    payload = "message=test&receptor=09111111111&linenumber=5000222&senddate=1508144471&checkid=1"

                                                                    headers = {
                                                                        'content-type': "application/x-www-form-urlencoded",
                                                                        'apikey': "your apikey",
                                                                        'cache-control': "no-cache",
                                                                    }

                                                                    conn.request("POST", "/v2/sms/send/bulk", payload, headers)

                                                                    res = conn.getresponse()
                                                                    data = res.read()

                                                                    print(data.decode("utf-8"))

                                                                
                                                        
 
                                                            

                                                                    package main

                                                                    import (
                                                                        "fmt"
                                                                        "strings"
                                                                        "net/http"
                                                                        "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                        url := "https://api.ghasedak.me/v2/sms/send/bulk"

                                                                        payload := strings.NewReader("message=test&receptor=09111111111&linenumber=5000222&senddate=1508144471&checkid=1")

                                                                        req, _ := http.NewRequest("POST", url, payload)

                                                                        req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                        req.Header.Add("apikey", "your apikey")
                                                                        req.Header.Add("cache-control", "no-cache")

                                                                        res, _ := http.DefaultClient.Do(req)

                                                                        defer res.Body.Close()
                                                                        body, _ := ioutil.ReadAll(res.Body)

                                                                        fmt.Println(res)
                                                                        fmt.Println(string(body))
                                                                    }


                                                                
                                                        
 
                                                            
                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/sms/send/bulk \
                                                                    -H 'apikey:  your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d 'message=test&receptor=09111111111&linenumber=5000222&senddate=1508144471&checkid=1'

                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                    },
                                                                        "items": [
                                                                            2581100787,
                                                                            2581100788
                                                                        ]
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"receptor is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

ارسال گروهی 2

از این متد برای ارسال پیامک گروهی به گیرندگان مختلف استفاده می شود.به این صورت که شماره فرستنده و متن پیام فقط یک شماره میتواند باشد و نیازی نیست به ازای هر گیرنده،یک شماره فرستنده وارد گردد.

آدرس وب سرویس

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
message string
Required
متنی که باید ارسال شود .
receptor string
Required
شماره گیرندگان پیام که با ( , ) از هم جدا می شوند . (..,09121111111,09122222222)
linenumber string
Required
شماره فرستنده پیام می باشد ، که اگر فید نشود از بین خطوط شما خط با اولویت بالاتر انتخاب می شود .
senddate string تاریخ و زمان دقیق ارسال پیام بر اساس Unixtime می باشد که اگر قید نشود در همان لحظه پیام ارسال می شود . (1508144471)
checkid string برای تعیین شماره ای یکتا از طرف کاربر برای هر پیامک به کار می رود که با ( , ) از هم جدا می شوند و پس از ارسال پیامک می توان با متد staus کلیه اطلاعات پیام ارسال شده را دریافت کرد .

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/sms/send/pair");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "message" , " test " );
                                                                    request.AddParameter("senddate", " 1508144471 ");
                                                                    request.AddParameter("linenumber", " 5000222 " );
                                                                    request.AddParameter( "receptor" , " 09111111111 , 09111111112 " );
                                                                    request.AddParameter( "checkid" , " 2020 , 2021 " );
                                                                    IRestResponse response = client.Execute(request);
                                                                
                                                    
 
                                                            
                                                                     "https://api.ghasedak.me/v2/sms/send/pair",
                                                                        CURLOPT_RETURNTRANSFER => true,
                                                                        CURLOPT_ENCODING => "",
                                                                        CURLOPT_MAXREDIRS => 10,
                                                                        CURLOPT_TIMEOUT => 30,
                                                                        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                        CURLOPT_CUSTOMREQUEST => "POST",
                                                                        CURLOPT_POSTFIELDS => "message=test.test&receptor=09111111111%2C09111111111&linenumber=5000222&checkid=1%2C2",
                                                                        CURLOPT_HTTPHEADER => array(
                                                                                "apikey: your apikey",
                                                                                "cache-control: no-cache",
                                                                                "content-type: application/x-www-form-urlencoded",
                                                                            ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                       echo "cURL Error #:" . $err;
                                                                    } else {
                                                                       echo $response;
                                                                    }

                                                                
                                                        
 
                                                            
                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "message=test.test&receptor=09111111111%2C09111111111&linenumber=5000222&checkid=1%2C2");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/sms/send/pair")
                                                                    .post(body)
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    Response response = client.newCall(request).execute();


                                                                  
                                                                
                                                        
 
                                                            
                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                        url: 'https://api.ghasedak.me/v2/sms/send/pair',
                                                                        headers:
                                                                        {
                                                                            'cache-control': 'no-cache',
                                                                            apikey: 'your apikey',
                                                                            'content-type': 'application/x-www-form-urlencoded'
                                                                        },
                                                                        form:
                                                                        {
                                                                            message: 'test.test',
                                                                            receptor: '09111111111,09111111111',
                                                                            linenumber: '5000222',
                                                                            checkid: '1,2'
                                                                        } 
                                                                    };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                        console.log(body);
                                                                    });

                                                                
                                                        
 
                                                            

                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/sms/send/pair"

                                                                    payload = "message=test.test&receptor=09111111111%09111111111&linenumber=5000222&checkid=1%2C2"
                                                                    headers = {
                                                                        'content-type': "application/x-www-form-urlencoded",
                                                                        'apikey': "your apikey",
                                                                        'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)

                                                                   

                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                        "fmt"
                                                                        "strings"
                                                                        "net/http"
                                                                        "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                        url := "https://api.ghasedak.me/v2/sms/send/pair"

                                                                        payload := strings.NewReader("message=test.test&receptor=09111111111%09111111111&linenumber=5000222&checkid=1%2C2")

                                                                        req, _ := http.NewRequest("POST", url, payload)

                                                                        req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                        req.Header.Add("apikey", "your apikey")
                                                                        req.Header.Add("cache-control", "no-cache")

                                                                        res, _ := http.DefaultClient.Do(req)

                                                                        defer res.Body.Close()
                                                                        body, _ := ioutil.ReadAll(res.Body)

                                                                        fmt.Println(res)
                                                                        fmt.Println(string(body))

                                                                    }



                                                                 

                                                                
                                                        
 
                                                            

                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/sms/send/pair \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -H 'postman-token: 56cbc819-a1dc-c576-0330-039c40eb11c1' \
                                                                    -d 'message=test.test&receptor=09111111111%09111111111&linenumber=5000222&checkid=1%2C2'

                                                                 
                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                    },
                                                                        "items": [
                                                                            2581100787,
                                                                            2581100788
                                                                        ]
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"receptor is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

سرویس اعتبار سنجی با پارامتر

سرویس اعتبارسنجی به شما این امکان را میدهد که بدون نیاز به داشتن خط خدماتی و طی کردن پروسه زمانبر تهیه آن بتوانید از طریق وب سرویس به راحتی و بالاترین سرعت ممکن پیام های خود مانند: کد فعال سازی،شماره چک و فاکتور،کد قرعه کشی و... را به تمامی کاربران اعم از فیلتر و غیر فیلتر ارسال نمایید.
در متن قالب نام برند ،شرکت و یا خدمات خود را حتما ذکر نمایید و حداقل حاوی یک پارامتر %param1% باشد.حداکثر از 10 پارامتر، %param1% ، %param2% , ... , %param10% میتوان استفاده کرد.
ویژه امکان ارسال پیامک به صورت بین المللی ( کشورهای مختلف دنیا ) در سرویس اعتبارسنجی، وجود دارد. شما می توانید پیام کوتاه ( متن ) خود را بدون هیچ محدودیتی به تمام نقاط جهان ارسال کنید.
جهت ارسال به شماره های خارج از ایران شماره گیرنده را با + و کد کشور ( مثال : +33456351753 ) شروع کنید.
تعرفه های بین المللی را می توانید در صفحه تعرفه ها مشاهده نمایید.

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
receptor string
Required
شماره گیرندگان پیام که با ( , ) از هم جدا می شوند . (..,09121111111,09122222222)
type int
Required
برای ارسال پیام متنی type=1 و برای ارسال پیام صوتی type=2 قرار دهید .
template string
Required
عنوان قالبی که در پنل خود ایجاد کرده اید .
checkid string برای تعیین شماره ای یکتا از طرف کاربر برای هر پیامک به کار می رود و پس از ارسال پیامک می توان با متد staus کلیه اطلاعات پیام ارسال شده را دریافت کرد .
param1 string
Required
مقادیری که از سمت شما وارد می شود ، وارد کردن حداقل 1 مورد اجباری است .
param2 string
مقادیری که از سمت شما وارد می شود .
param3 string
مقادیری که از سمت شما وارد می شود .
param4 string
مقادیری که از سمت شما وارد می شود .
param5 string
مقادیری که از سمت شما وارد می شود .
param6 string
مقادیری که از سمت شما وارد می شود .
param7 string
مقادیری که از سمت شما وارد می شود .
param8 string
مقادیری که از سمت شما وارد می شود .
param9 string
مقادیری که از سمت شما وارد می شود .
param10 string
مقادیری که از سمت شما وارد می شود .

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/verification/send/simple");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "receptor" , " 09111111111 , 09111111112 " );
                                                                    request.AddParameter("type", 1 );
                                                                    request.AddParameter("template", " test " );
                                                                    request.AddParameter( "param1" , " test1 " );;
                                                                    request.AddParameter( "param2" , " test2 " );;
                                                                    request.AddParameter( "param3" , " test3 " );
                                                                    IRestResponse response = client.Execute(request);
                                                                
                                                    
 
                                                            
                                                                     "https://api.ghasedak.me/v2/verification/send/simple",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => "receptor=09111111111&template=test&type=1& param1=test1",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }





                                                                    

                                                                
                                                        
 
                                                            

                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "receptor=09111111111&template=test&type=1& param1=test1");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/verification/send/simple")
                                                                    .post(body)
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    Response response = client.newCall(request).execute();


                                                                  


                                                                
                                                        
 
                                                            

                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/verification/send/simple',
                                                                    headers:
                                                                    {
                                                                    'cache-control': 'no-cache',
                                                                    apikey: 'your apikey',
                                                                    'content-type': 'application/x-www-form-urlencoded' },
                                                                    form:
                                                                    { receptor: '09111111111',
                                                                    template: 'test',
                                                                    type: '1',
                                                                    param1: 'test1' } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });



                                                                 
                                                                
                                                        
 
                                                            

                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/verification/send/simple"
                                                                    payload = "receptor=09111111111&template=test&type=1& param1=test1"

                                                                    headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "your apikey",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)



                                                                
                                                        
 
                                                            

                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/verification/send/simple"

                                                                    payload := strings.NewReader("receptor=09111111111&template=test&type=1& param1=test1")

                                                                    req, _ := http.NewRequest("POST", url, payload)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }





                                                                   

                                                                
                                                        
 
                                                            
                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/verification/send/simple \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d 'receptor=09111111111&template=test1&type=1& param1=test1'



                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                    },
                                                                        "items": [
                                                                            2581100787,
                                                                            2581100788
                                                                        ]
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"receptor is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

ارسال پیام صوتی

با استفاده از این متد شما می توانید پیام های خود را به صورت متنی نوشته و آنها را به صورت صوتی ارسال نمایید

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
message string
Required
متنی که باید ارسال شود .
receptor string
Required
شماره گیرندگان پیام که با ( , ) از هم جدا می شوند . (..,09121111111,09122222222)
senddate string
Required
تاریخ و زمان دقیق ارسال پیام بر اساس Unixtime می باشد که اگر قید نشود در همان لحظه پیام ارسال می شود . (1508144471)

نمونه کد

                                                            

                                                                    var client = new RestClient("https://api.ghasedak.me/v2/voice/send/simple");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "message" , " test " );
                                                                    request.AddParameter( "receptor" , " 09121111111 , 09122222222 " );
                                                                    request.AddParameter( "senddate" , " 1508144471 " );
                                                                    IRestResponse response = client.Execute(request);

                                                                
                                                    
 
                                                            
                                                                     "https://api.ghasedak.me/v2/voice/send/simple",
                                                                        CURLOPT_RETURNTRANSFER => true,
                                                                        CURLOPT_ENCODING => "",
                                                                        CURLOPT_MAXREDIRS => 10,
                                                                        CURLOPT_TIMEOUT => 30,
                                                                        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                        CURLOPT_CUSTOMREQUEST => "POST",
                                                                        CURLOPT_POSTFIELDS => "message=test&receptor=09111111111",
                                                                        CURLOPT_HTTPHEADER => array(
                                                                        "apikey: your apikey",
                                                                        "cache-control: no-cache",
                                                                        "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                     echo "cURL Error #:" . $err;
                                                                    } else {
                                                                        echo $response;
                                                                    }








                                                                 



                                                                
                                                        
 
                                                            

                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "message=test&receptor=09111111111");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/voice/send/simple")
                                                                    .post(body)
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    


                                                                
                                                        
 
                                                            
                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/voice/send/simple',
                                                                    headers:
                                                                    {
                                                                        'cache-control': 'no-cache',
                                                                        'content-type': 'application/x-www-form-urlencoded',
                                                                        apikey: 'your apikey',
                                                                        form: { message: 'test', receptor: '09111111111' } };

                                                                        request(options, function (error, response, body) {
                                                                        if (error) throw new Error(error);

                                                                        console.log(body);
                                                                    });




                                                                  



                                                                
                                                        
 
                                                            
                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/voice/send/simple"

                                                                    payload = "message=test&receptor=09111111111"
                                                                    headers = {
                                                                        'apikey': "your apikey",
                                                                        'content-type': "application/x-www-form-urlencoded",
                                                                        'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)



                                                                   



                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                        "fmt"
                                                                        "strings"
                                                                        "net/http"
                                                                        "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                        url := "https://api.ghasedak.me/v2/voice/send/simple"

                                                                        payload := strings.NewReader("message=test&receptor=09111111111")

                                                                        req, _ := http.NewRequest("POST", url, payload)

                                                                        req.Header.Add("apikey", "your apikey")
                                                                        req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                        req.Header.Add("cache-control", "no-cache")

                                                                        res, _ := http.DefaultClient.Do(req)

                                                                        defer res.Body.Close()
                                                                        body, _ := ioutil.ReadAll(res.Body)

                                                                        fmt.Println(res)
                                                                        fmt.Println(string(body))
                                                                    }



                                                                  






                                                                
                                                        
 
                                                            

                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/voice/send/simple \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d 'message=test&receptor=09111111111'

                                                                

                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                                "code": 200,
                                                                                "message": "success"
                                                                            },
                                                                        "items": [
                                                                            {
                                                                                "messageid": 2581227073,
                                                                                "message": "test",
                                                                                "voice": 8,
                                                                                "price": 155,
                                                                                "sender": "30005088",
                                                                                "receptor": "09121111111",
                                                                                "senddate": "1605968584"
                                                                            }
                                                                        ]
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"messageid is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

وضعیت پیام های ارسالی

برای دریافت وضعیت پیامک ارسالی به گیرنده از این متد استفاده می شود . کاربر می توان با هر بار فراخوانی این متد وضعیت 100 پیامک را دریافت کند . مقدار بازگشتی این متد می توانید مقدار صحیح شامل یکی از اعداد زیر باشد:

آدرس وب سرویس

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
id string
Required
شناسه پیامک که با ( , ) ازهم جدا می شوند.
type string
Required
نوع id پیام را مشخص می کند ( 1 برای messageid و 2 برای checkid )

مقادیر بازگشتی

Parameter Format Description
0 int تحویل به اپراتور
1 int رسیده به گوشی
2 int ارسال با خطا
8 int رسیده به مخابرات
16 int نرسیده به مخابرات
27 int شماره گیرنده جزو لیست سیاه می باشد
-1 int شناسه ارسال شده اشتباه است

نمونه کد

                                                            

                                                                    var client = new RestClient("https://api.ghasedak.me/v2/sms/status");
                                                                    var request = new RestRequest(Method.GET);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "id" , " 2025 , 2026 " );
                                                                    request.AddParameter( "type" , " 1 " );
                                                                    IRestResponse response = client.Execute(request);

                                                                   
                                                                
                                                    
 
                                                            
                                                                     "https://api.ghasedak.me/v2/sms/status",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => "id=2581227073&type=1",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }



                                                                   
                                                                
                                                        
 
                                                            
                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "id=2581227073&type=1");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/sms/status")
                                                                    .post(body)
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();


                                                                
                                                        
 
                                                            

                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/sms/status',
                                                                    headers:
                                                                    { 
                                                                    'cache-control': 'no-cache',
                                                                    'content-type': 'application/x-www-form-urlencoded',
                                                                    apikey: 'your apikey',
                                                                    form: { id: '2581227073', type: '1' } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });




                                                                   

                                                                
                                                        
 
                                                            
                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/sms/status"

                                                                    payload = "id=2581227073&type=1"
                                                                    headers = {
                                                                    'apikey': "your apikey",
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'cache-control': "no-cache",
                                                                    'postman-token': "46479325-f7e3-49f8-4e05-3ec2a37ed6ab"
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)


                                                                 

                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/sms/status"

                                                                    payload := strings.NewReader("id=2581227073&type=1")

                                                                    req, _ := http.NewRequest("POST", url, payload)

                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }



                                                                  



                                                                
                                                        
 
                                                            

                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/sms/status \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d 'id=2581227073&type=1'

                                                                 

                                                                
                                                        
                                                            
                                                                    {
                                                                    "result": {
                                                                    "code": 200,
                                                                    "message": "success"
                                                                    },
                                                                    "items": [
                                                                    {
                                                                    "messageid": 2581227073,
                                                                    "message": "test",
                                                                    "status": 8,
                                                                    "price": 155,
                                                                    "sender": "30005088",
                                                                    "receptor": "09121111111",
                                                                    "senddate": "1605968584"
                                                                    }
                                                                    ]
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"messageid is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

افزودن گروه جدید

از این متد برای اضافه کردن گروه جدید استفاده می شود.

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
name string
Required
نام گروه
parent int
اگر مقدار parent قید نشود گروه جدید در مسیر ریشه ساخته می شود در عیر این صورت باید groupid گروه مورد نظر را ارسال کرد .

نمونه کد

                                                            

                                                                    var client = new RestClient("https://api.ghasedak.me/v2/contact/group/new");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("cache-control", "no-cache");
                                                                    request.AddHeader("content-type", "application/x-www-form-urlencoded");
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter("application/x-www-form-urlencoded", "name=test&parent=209530", ParameterType.RequestBody);
                                                                    IRestResponse response = client.Execute(request);

                                                                  
                                                                
                                                    
 
                                                            
                                                                     "https://api.ghasedak.me/v2/contact/group/new",
                                                                        CURLOPT_RETURNTRANSFER => true,
                                                                        CURLOPT_ENCODING => "",
                                                                        CURLOPT_MAXREDIRS => 10,
                                                                        CURLOPT_TIMEOUT => 30,
                                                                        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                        CURLOPT_CUSTOMREQUEST => "POST",
                                                                        CURLOPT_POSTFIELDS => "name=test&parent=209530",
                                                                        CURLOPT_HTTPHEADER => array(
                                                                        "apikey: your apikey",
                                                                        "cache-control: no-cache",
                                                                        "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                       echo "cURL Error #:" . $err;
                                                                    } else {
                                                                       echo $response;
                                                                    }


                                                                  



                                                                
                                                        
 
                                                            
                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "name=test&parent=209530");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/contact/group/new")
                                                                    .post(body)
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                   
                                                                
                                                        
 
                                                            

                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/contact/group/new',
                                                                    headers:
                                                                    { 
                                                                        'cache-control': 'no-cache',
                                                                        'content-type': 'application/x-www-form-urlencoded',
                                                                        apikey: 'your apikey',
                                                                        form: { name: 'test', parent: '209530' } };

                                                                        request(options, function (error, response, body) {
                                                                            if (error) throw new Error(error);

                                                                            console.log(body);
                                                                    });



                                                                   



                                                                
                                                        
 
                                                            
                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/contact/group/new"

                                                                    payload = "name=test&parent=209530"
                                                                    headers = {
                                                                        'apikey': "your apikey",
                                                                        'content-type': "application/x-www-form-urlencoded",
                                                                        'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)


                                                                  



                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                        "fmt"
                                                                        "strings"
                                                                        "net/http"
                                                                        "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                        url := "https://api.ghasedak.me/v2/contact/group/new"

                                                                        payload := strings.NewReader("name=test&parent=209530")

                                                                        req, _ := http.NewRequest("POST", url, payload)

                                                                        req.Header.Add("apikey", "your apikey")
                                                                        req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                        req.Header.Add("cache-control", "no-cache")

                                                                        res, _ := http.DefaultClient.Do(req)

                                                                        defer res.Body.Close()
                                                                        body, _ := ioutil.ReadAll(res.Body)

                                                                        fmt.Println(res)
                                                                        fmt.Println(string(body))

                                                                    }


                                                                   
                                                                
                                                        
 
                                                            

                                                                  
                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/contact/group/new \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -H 'postman-token: 87e252a0-ac29-f98e-5e9e-a8d7adf51413' \
                                                                    -d 'name=test&parent=209530'

                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                    },
                                                                        "items": {
                                                                            "groupid": 209531
                                                                        }
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"name is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

افزودن لیست مخاطبین به گروه

از این متد برای اضافه کردن همزمان لیستی از مخاطبین به یک گروه استفاده می شود.

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
groupid int
Required
شماره گروه که به هنگام ثبت گروه دریافت شده است .
number string
Required
شماره تلفن مخاطبین که با ( , ) از هم جدا می شوند . (..,09121111111,09122222222)
firstname string
نام تلفن مخاطبین که با ( , ) از هم جدا می شوند
lastname string
نام خانوادگی تلفن مخاطبین که با ( , ) از هم جدا می شوند
email string
ایمیل تلفن مخاطبین که با ( , ) از هم جدا می شوند

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/contact/group/addnumber");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "groupid" , 0 );
                                                                    request.AddParameter( "number" , " test " );
                                                                    request.AddParameter( "firstname" , " ali " );
                                                                    request.AddParameter( "lastname" , " rad " );
                                                                    request.AddParameter( "email" , " a@a.com " );
                                                                    IRestResponse response = client.Execute(request);

                                                                   

                                                                
                                                    
 
                                                            
                                                                     "https://api.ghasedak.me/v2/contact/group/addnumber",
                                                                        CURLOPT_RETURNTRANSFER => true,
                                                                        CURLOPT_ENCODING => "",
                                                                        CURLOPT_MAXREDIRS => 10,
                                                                        CURLOPT_TIMEOUT => 30,
                                                                        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                        CURLOPT_CUSTOMREQUEST => "POST",
                                                                        CURLOPT_POSTFIELDS => "groupid=209530&number=09121111111%2C09122222222&firstname=test&lastname=test&email=test",
                                                                        CURLOPT_HTTPHEADER => array(
                                                                        "apikey: your apikey",
                                                                        "cache-control: no-cache",
                                                                        "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                      echo "cURL Error #:" . $err;
                                                                    } else {
                                                                       echo $response;
                                                                    }


                                                                   



                                                                
                                                        
 
                                                            

                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "groupid=209530&number=09121111111%2C09122222222&firstname=test&lastname=test&email=test");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/contact/group/addnumber")
                                                                    .post(body)
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                  

                                                                
                                                        
 
                                                            
                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/contact/group/addnumber',
                                                                    headers:
                                                                    { 
                                                                    'cache-control': 'no-cache',
                                                                    apikey: 'your apikey',
                                                                    'content-type': 'application/x-www-form-urlencoded' },
                                                                    form:
                                                                    { groupid: '209530',
                                                                    number: '09121111111,09122222222',
                                                                    firstname: 'test',
                                                                    lastname: 'test',
                                                                    email: 'test' } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });

                                                                
                                                        
 
                                                            
                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/contact/group/addnumber"

                                                                    payload = "groupid=209530&number=09121111111%2C09122222222&firstname=test&lastname=test&email=test"
                                                                    headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "your apikey",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)


                                                                  


                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/contact/group/addnumber"

                                                                    payload := strings.NewReader("groupid=209530&number=09121111111%2C09122222222&firstname=test&lastname=test&email=test")

                                                                    req, _ := http.NewRequest("POST", url, payload)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }



                                                                   
                                                                
                                                        
 
                                                            

                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/contact/group/addnumber \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d 'groupid=209530&number=09121111111%2C09122222222&firstname=test&lastname=test&email=test'


                                                                  
                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                    },
                                                                        "items": null
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"groupid is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

لیست گروه ها

از این متد برای گرفتن لیست گروه های مخاطبین استفاده می شود.

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
parent int
Required
اگر مقدار parent قید نشود parent=0 در نظر گرفته می شود و لیست گرو ها در سطح ریشه نمایش داده می شودو در عیر این صورت باید groupid مورد نظر را ارسال کنید تا لیست زیر گرو های ان گروه در خروجی نمایش داده شود .

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/contact/group/list");
                                                                    var request = new RestRequest(Method.GET);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "parent" , 1020 );
                                                                    IRestResponse response = client.Execute(request);

                                                                
                                                    
 
                                                            
                                                                     "https://api.ghasedak.me/v2/contact/group/list",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "GET",
                                                                    CURLOPT_POSTFIELDS => "parent=209530",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }


                                                                  




                                                                
                                                        
 
                                                            

                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "parent=209530");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/contact/group/list")
                                                                    .get()
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                   


                                                                
                                                        
 
                                                            
                                                                    var request = require("request");

                                                                    var options = { method: 'GET',
                                                                    url: 'https://api.ghasedak.me/v2/contact/group/list',
                                                                    headers:
                                                                    { 
                                                                    'cache-control': 'no-cache',
                                                                    apikey: 'your apikey',
                                                                    'content-type': 'application/x-www-form-urlencoded' },
                                                                    form: { parent: '209530' } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });



                                                                  
                                                                
                                                        
 
                                                            
                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/contact/group/list"

                                                                    payload = "parent=209530"
                                                                    headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "your apikey",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("GET", url, data=payload, headers=headers)

                                                                    print(response.text)


                                                                 



                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/contact/group/list"

                                                                    payload := strings.NewReader("parent=209530")

                                                                    req, _ := http.NewRequest("GET", url, payload)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }



                                                                 

                                                                
                                                        
 
                                                            

                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/contact/group/addnumber \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d 'groupid=209530&number=09121111111%2C09122222222&firstname=test&lastname=test&email=test'


                                                                 
                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                        },
                                                                        "items": [
                                                                            {
                                                                                "id": 172694,
                                                                                "name": "test2",
                                                                                "parent": 0
                                                                            },
                                                                            {
                                                                                "id": 173748,
                                                                                "name": "test",
                                                                                "parent": 0
                                                                            },
                                                                        
                                                                        ]
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"groupid is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

لیست مخاطبین گروه

از این متد برای گرفتن لیست شماره ها و مشخصات مخاطبین یک گروه استفاده می شود.

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
groupid int
Required
شماره گروه که به هنگام ثبت گروه دریافت شده
offset int
دسته بندی لیست مخاطبین به تعداد offset داده شده انجام می گیرد ، که اگر قید نشود مقدار آن (offset=100) در نظر گرفته می شود .
page int
صفحه مورد نظر از لیست مخاطبین ، اگر مقدار داده نشود (page=1) در نظر گرفته می شود

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/contact/group/listnumber ");
                                                                    var request = new RestRequest(Method.GET);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "groupid" , 1020 );
                                                                    request.AddParameter( "offset" , 50 );
                                                                    request.AddParameter( "page" , 2 );
                                                                    IRestResponse response = client.Execute(request);

                                                                
                                                    
 
                                                            

                                                                     "http://api.ghasedak.me/v2/contact/group/listnumber?groupid=172694&offset=100&page=0",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "GET",
                                                                    CURLOPT_POSTFIELDS => "groupid=209530&offset=100",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }


                                                                 
                                                                
                                                        
 
                                                            

                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "groupid=209530&offset=100");
                                                                    Request request = new Request.Builder()
                                                                    .url("http://api.ghasedak.me/v2/contact/group/listnumber?groupid=172694&offset=100&page=0")
                                                                    .get()
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    Response response = client.newCall(request).execute();


                                                                  



                                                                
                                                        
 
                                                            

                                                                    var request = require("request");

                                                                    var options = { method: 'GET',
                                                                    url: 'http://api.ghasedak.me/v2/contact/group/listnumber',
                                                                    qs: { groupid: '172694', offset: '100', page: '0' },
                                                                    headers:
                                                                    {
                                                                    'cache-control': 'no-cache',
                                                                    'content-type': 'application/x-www-form-urlencoded',
                                                                    apikey: 'your apikey',
                                                                    form: { groupid: '209530', offset: '100' } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });



                                                                 
                                                                
                                                        
 
                                                            

                                                                    import requests

                                                                    url = "http://api.ghasedak.me/v2/contact/group/listnumber"

                                                                    querystring = {"groupid":"172694","offset":"100","page":"0"}

                                                                    payload = "groupid=209530&offset=100"
                                                                    headers = {
                                                                    'apikey': "your apikey",
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

                                                                    print(response.text)



                                                                  



                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "http://api.ghasedak.me/v2/contact/group/listnumber?groupid=172694&offset=100&page=0"

                                                                    payload := strings.NewReader("groupid=209530&offset=100")

                                                                    req, _ := http.NewRequest("GET", url, payload)

                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }



                                                                 
                                                                
                                                        
 
                                                            

                                                                  
                                                                    curl -X GET \
                                                                    'http://api.ghasedak.me/v2/contact/group/listnumber?groupid=172694&offset=100&page=0' \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d 'groupid=209530&offset=100'

                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                        },
                                                                        "items": [
                                                                            {
                                                                                "firstName": "test",
                                                                                "lastName": "test",
                                                                                "number": "0911111111",
                                                                                "email": "test"
                                                                            }
                                                                        ]
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"groupid is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

ویرایش گروه ها

از این متد برای ویرایش گروه ها (تغییر نام گروه) استفاده می شود.

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
groupid int
Required
شماره گروه که به هنگام ثبت گروه دریافت شده
name string
Required
نام جدید برای گروه

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/contact/group/edit");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "groupid" , 1020 );
                                                                    request.AddParameter( "name" , " test " );
                                                                    IRestResponse response = client.Execute(request);

                                                                
                                                    
 
                                                            

                                                                     "https://api.ghasedak.me/v2/contact/group/edit",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => "groupid=172694&name=test",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }


                                                                  
                                                                
                                                        
 
                                                            

                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "groupid=209530&offset=100");
                                                                    Request request = new Request.Builder()
                                                                    .url("http://api.ghasedak.me/v2/contact/group/listnumber?groupid=172694&offset=100&page=0")
                                                                    .get()
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    Response response = client.newCall(request).execute();


                                                                  



                                                                
                                                        
 
                                                            

                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/contact/group/edit',
                                                                    headers:
                                                                    { 
                                                                    'cache-control': 'no-cache',
                                                                    apikey: 'your apikey',
                                                                    'content-type': 'application/x-www-form-urlencoded' },
                                                                    form: { groupid: '172694', name: 'test' } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });




                                                                  



                                                                
                                                        
 
                                                            
                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/contact/group/edit"

                                                                    payload = "groupid=172694&name=test"
                                                                    headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "your apikey",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)




                                                                  




                                                                
                                                        
 
                                                            

                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/contact/group/edit"

                                                                    payload := strings.NewReader("groupid=172694&name=test")

                                                                    req, _ := http.NewRequest("POST", url, payload)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }



                                                                  
                                                                
                                                        
 
                                                            
                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/contact/group/edit \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -H 'postman-token: fbf20134-cdab-67ae-1ebf-b0dd08f4c8ed' \
                                                                    -d 'groupid=172694&name=test'



                                                                   
                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                        },
                                                                        "items": null
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"groupid is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

حذف گروه

از این متد برای حذف گروه مخاطبین استفاده می شود.

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
groupid int
Required
شماره گروه که به هنگام ثبت گروه دریافت شده

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/contact/group/edit");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "groupid" , 1020 );
                                                                    request.AddParameter( "name" , " test " );
                                                                    IRestResponse response = client.Execute(request);

                                                                
                                                    
 
                                                            

                                                                     "https://api.ghasedak.me/v2/contact/group/remove",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => "groupid=172694",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }



                                                                  
                                                                
                                                        
 
                                                            

                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "groupid=172694");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/contact/group/remove")
                                                                    .post(body)
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    Response response = client.newCall(request).execute();


                                                                  





                                                                
                                                        
 
                                                            
                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/contact/group/remove',
                                                                    headers:
                                                                    {
                                                                    'cache-control': 'no-cache',
                                                                    apikey: 'your apikey',
                                                                    'content-type': 'application/x-www-form-urlencoded' },
                                                                    form: { groupid: '172694' } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });





                                                                
                                                        
 
                                                            

                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/contact/group/remove"

                                                                    payload = "groupid=172694"
                                                                    headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "your apikey",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)


                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/contact/group/remove"

                                                                    payload := strings.NewReader("groupid=172694")

                                                                    req, _ := http.NewRequest("POST", url, payload)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }





                                                                  
                                                                
                                                        
 
                                                            
                                                                  

                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/contact/group/remove \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d groupid=172694

                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                        },
                                                                        "items": null
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"groupid is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

حذف مخاطبین از گروه

از این متد برای حذف مخاطبین از گروه استفاده می شود.

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
groupid int
Required
شماره گروه که به هنگام ثبت گروه دریافت شده
ids int
Required
شماره رکورد های مخاطبین گروه که با ( , ) از هم جدا می شوند . (..,137051455,137051455)

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/contact/group/number/remove");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "groupid" , 1020 );
                                                                    request.AddParameter( "ids" , " 217820318,217820319 " );
                                                                    IRestResponse response = client.Execute(request);

                                                                
                                                    
 
                                                            

                                                                     "https://api.ghasedak.me/v2/contact/group/number/remove",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => "groupid=172694",
                                                                    CURLOPT_POSTFIELDS => "ids=217820318,217820319",

                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }




                                                                
                                                        
 
                                                            

                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "groupid=172694", "ids=217820318,217820319");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/contact/group/number/remove")
                                                                    .post(body)
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    Response response = client.newCall(request).execute();








                                                                
                                                        
 
                                                            
                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/contact/group/number/remove',
                                                                    headers:
                                                                    {
                                                                    'cache-control': 'no-cache',
                                                                    apikey: 'your apikey',
                                                                    'content-type': 'application/x-www-form-urlencoded' },
                                                                    form: { groupid: '172694',ids: '217820318,217820319' } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });





                                                                
                                                        
 
                                                            

                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/contact/group/number/remove"

                                                                    payload = "groupid=172694&ids=217820319%217820318"
                                                                    headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "your apikey",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)


                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/contact/group/number/remove"

                                                                    payload := strings.NewReader("groupid=172694&ids=217820319%217820318")

                                                                    req, _ := http.NewRequest("POST", url, payload)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }






                                                                
                                                        
 
                                                            


                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/contact/group/number/remove \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d groupid=172694&ids=217820319%217820318

                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                        },
                                                                        "items": null
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"groupid is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

پیام های دریافتی

از این متد برای گرفتن لیست پیام های دریافتی استفاده می شود، به ازای هر بار فراخوانی این متد 100 پیام بازگردانده می شود.

آدرس وب سرویس

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
linenumber String
Required
شماره خط
isread int
Required
اگر (0) وارد شود پیام های خوانده نشده و اگر (1) وارد شود پیام های خوانده شده بر می گردد.

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/sms/receive/last");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "linenumber" , " 5000222 " );
                                                                    request.AddParameter( "isread" , 1 );
                                                                    IRestResponse response = client.Execute(request);
                                                                
                                                    
 
                                                            

                                                                     "https://api.ghasedak.me/v2/sms/receive/last",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => "linenumber=5000222 &isread=1",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }



                                                                
                                                        
 
                                                            






                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "linenumber=5000222 &isread=1");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/sms/receive/last")
                                                                    .post(body)
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    Response response = client.newCall(request).execute();









                                                                
                                                        
 
                                                            

                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/sms/receive/last',
                                                                    headers:
                                                                    {
                                                                    'cache-control': 'no-cache',
                                                                    apikey: 'your apikey',
                                                                    'content-type': 'application/x-www-form-urlencoded' },
                                                                    form: { linenumber: '5000222 ', isread: '1' } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });



                                                                
                                                                
                                                        
 
                                                            

                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/sms/receive/last"

                                                                    payload = "linenumber=5000222%20&isread=1"
                                                                    headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "your apikey",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)


                                                                 

                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/sms/receive/last"

                                                                    payload := strings.NewReader("linenumber=5000222%20&isread=1")

                                                                    req, _ := http.NewRequest("POST", url, payload)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }



                                                                  
                                                                
                                                        
 
                                                            
                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/sms/receive/last \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -H 'postman-token: d9c3bf8e-b75d-9220-7641-1701d3339a0a' \
                                                                    -d 'linenumber=5000222%20&isread=1'

                                                                
                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                        },
                                                                         "items": [
                                                                              {
                                                                                 "messageid": 1020,
                                                                                 "message": "test",
                                                                                 "sender": "09122222222",
                                                                                 "linenumber": "1000200",
                                                                                 "receivedate": "2017-10-16T12:31:1"
                                                                              }
                                                                        ]
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"linenumber is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

پیام های دریافتی به صورت صفحه بندی

از این متد برای گرفتن لیست پیام های دریافتی به صورت صفحه بندی استفاده می شود، به ازای هر بار فراخوانی این متد 200 پیام بازگردانده می شود.

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
linenumber String
Required
شماره خط
isread int
Required
اگر (0) وارد شود پیام های خوانده نشده و اگر (1) وارد شود پیام های خوانده شده بر می گردد.
fromdate String
Required
تاریخ و زمان دقیق شروع ارسال پیام بر اساس Unixtime می باشد.
todate String
Required
تاریخ و زمان دقیق پایان ارسال پیام بر اساس Unixtime می باشد.
page int
Required
صفحه مورد نظر را وارد کنید، صفحه اول 0 می باشد.
offset int
Required
تعداد پیام بازگشتی در هر صفحه ، حداکثر تعداد 200 می باشد.

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/sms/receive/paging");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "linenumber" , " 5000222 " );
                                                                    request.AddParameter( "isread" , 1 );
                                                                    request.AddParameter( "fromdate" , 1508144471 );
                                                                    request.AddParameter( "todate" , 1508144471 );
                                                                    request.AddParameter( "page" , 0 );
                                                                    request.AddParameter( "offset" , 200 );
                                                                    IRestResponse response = client.Execute(request);
                                                                
                                                    
 
                                                            


                                                                     "https://api.ghasedak.me/v2/sms/receive/paging",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => "offset=1&fromdate=1508144471&todate=1508144471&page=1&linenumber=5000222%20&isread=1",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }



                                                                   
                                                                
                                                        
 
                                                            


                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "offset=1&fromdate=1508144471&todate=1508144471&page=1&linenumber=5000222%20&isread=1");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/sms/receive/paging")
                                                                    .post(body)
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    Response response = client.newCall(request).execute();



                                                                







                                                                
                                                        
 
                                                            

                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/sms/receive/paging',
                                                                    headers:
                                                                    { 
                                                                    'cache-control': 'no-cache',
                                                                    apikey: 'your apikey',
                                                                    'content-type': 'application/x-www-form-urlencoded' },
                                                                    form:
                                                                    { offset: '1',
                                                                    fromdate: '1508144471',
                                                                    todate: '1508144471',
                                                                    page: '1',
                                                                    linenumber: '5000222 ',
                                                                    isread: '1' } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });



                                                                  

                                                                
                                                        
 
                                                            
                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/sms/receive/paging"

                                                                    payload = "offset=1&fromdate=1508144471&todate=1508144471&page=1&linenumber=5000222%20&isread=1"
                                                                    headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "your apikey",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)



                                                                 
                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/sms/receive/paging"

                                                                    payload := strings.NewReader("offset=1&fromdate=1508144471&todate=1508144471&page=1&linenumber=5000222%20&isread=1")

                                                                    req, _ := http.NewRequest("POST", url, payload)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }



                                                                 
                                                                
                                                        
 
                                                            
                                                                   
                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/sms/receive/paging \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d 'offset=1&fromdate=1508144471&todate=1508144471&page=1&linenumber=5000222%20&isread=1'
                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                        },
                                                                        "items": [
                                                                            {
                                                                                "messageid": 1020,
                                                                                "message": "test",
                                                                                "sender": "09122222222",
                                                                                "linenumber": "1000200",
                                                                                "receivedate": "2017-10-16T12:31:1"
                                                                            }
                                                                            ,{
                                                                                "messageid": 1021,
                                                                                "message": "test2",
                                                                                "sender": "09122222222",
                                                                                "linenumber": "1000200",
                                                                                "receivedate": "2017-10-16T12:31:1"
                                                                            }     ]
                                                                            },
                                                                        "totalcount": 1000
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"linenumber is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

لغو پیام ارسالی

از این متد برای لغو پیام های ارسالی زمانبندی شده استفاده میگردد.به این معنا که هر پیامی قابل حذف نمی باشد.

آدرس وب سرویس

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
messageid String
Required
شناسه پیامک که با ( , ) ازهم جدا می شوند .

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/sms/cancel");
                                                                    var request = new RestRequest(Method.POST);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    request.AddParameter( "messageid" , " 1020 , 1022 " );
                                                                    IRestResponse response = client.Execute(request);
                                                                
                                                    
 
                                                            


                                                                     "https://api.ghasedak.me/v2/sms/cancel",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => "messageids=123456",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }




                                                                
                                                        
 
                                                            


                                                                    OkHttpClient client = new OkHttpClient();

                                                                    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
                                                                    RequestBody body = RequestBody.create(mediaType, "messageids=123456");
                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/sms/cancel")
                                                                    .post(body)
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    Response response = client.newCall(request).execute();











                                                                
                                                        
 
                                                            

                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/sms/cancel',
                                                                    headers:
                                                                    {
                                                                    'cache-control': 'no-cache',
                                                                    apikey: 'your apikey',
                                                                    'content-type': 'application/x-www-form-urlencoded' },
                                                                    form:
                                                                    { messageids: '123456',
                                                                    } };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });





                                                                
                                                        
 
                                                            
                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/sms/cancel"

                                                                    payload = " messageids: '123456'"
                                                                    headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "your apikey",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)




                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "strings"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/sms/cancel"
                                                                    payload := strings.NewReader("messageids=123456")

                                                                    req, _ := http.NewRequest("POST", url, payload)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }




                                                                
                                                        
 
                                                            

                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/sms/cancel \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \
                                                                    -d 'messageids=123456'
                                                                    
                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                        },
                                                                        "items": [
                                                                                  1022,1023
                                                                        ]
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"linenumber is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }
                                                                
                                                        

اطلاعات کاربری

این متد برای دریافت اطلاعات کاربری شامل مقدار ریالی اعتبار باقیمانده و تاریخ انقضا حساب کاربری شخص می باشد

آدرس وب سرویس

پارامتر های ورودی

Parameter Format Description
apikey string
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.

نمونه کد

                                                            
                                                                    var client = new RestClient("https://api.ghasedak.me/v2/account/info");
                                                                    var request = new RestRequest(Method.GET);
                                                                    request.AddHeader("apikey" ," your apikey " );
                                                                    IRestResponse response = client.Execute(request);


                                                                 
                                                                
                                                    
 
                                                            

                                                                     "https://api.ghasedak.me/v2/account/info",
                                                                    CURLOPT_RETURNTRANSFER => true,
                                                                    CURLOPT_ENCODING => "",
                                                                    CURLOPT_MAXREDIRS => 10,
                                                                    CURLOPT_TIMEOUT => 30,
                                                                    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                                                    CURLOPT_CUSTOMREQUEST => "POST",
                                                                    CURLOPT_POSTFIELDS => "",
                                                                    CURLOPT_HTTPHEADER => array(
                                                                    "apikey: your apikey",
                                                                    "cache-control: no-cache",
                                                                    "content-type: application/x-www-form-urlencoded",
                                                                    ),
                                                                    ));

                                                                    $response = curl_exec($curl);
                                                                    $err = curl_error($curl);

                                                                    curl_close($curl);

                                                                    if ($err) {
                                                                    echo "cURL Error #:" . $err;
                                                                    } else {
                                                                    echo $response;
                                                                    }




                                                                
                                                        
 
                                                            

                                                                    OkHttpClient client = new OkHttpClient();

                                                                    Request request = new Request.Builder()
                                                                    .url("https://api.ghasedak.me/v2/account/info")
                                                                    .post(null)
                                                                    .addHeader("content-type", "application/x-www-form-urlencoded")
                                                                    .addHeader("apikey", "your apikey")
                                                                    .addHeader("cache-control", "no-cache")
                                                                    .build();

                                                                    Response response = client.newCall(request).execute();


                                                                  









                                                                
                                                        
 
                                                            
                                                                    var request = require("request");

                                                                    var options = { method: 'POST',
                                                                    url: 'https://api.ghasedak.me/v2/account/info',
                                                                    headers:
                                                                    { 
                                                                    'cache-control': 'no-cache',
                                                                    apikey: 'your apikey',
                                                                    'content-type': 'application/x-www-form-urlencoded' },
                                                                    form: {} };

                                                                    request(options, function (error, response, body) {
                                                                    if (error) throw new Error(error);

                                                                    console.log(body);
                                                                    });






                                                                
                                                        
 
                                                            

                                                                    import requests

                                                                    url = "https://api.ghasedak.me/v2/account/info"

                                                                    payload = ""
                                                                    headers = {
                                                                    'content-type': "application/x-www-form-urlencoded",
                                                                    'apikey': "your apikey",
                                                                    'cache-control': "no-cache",
                                                                    }

                                                                    response = requests.request("POST", url, data=payload, headers=headers)

                                                                    print(response.text)


                                                                   
                                                                
                                                        
 
                                                            
                                                                    package main

                                                                    import (
                                                                    "fmt"
                                                                    "net/http"
                                                                    "io/ioutil"
                                                                    )

                                                                    func main() {

                                                                    url := "https://api.ghasedak.me/v2/account/info"

                                                                    req, _ := http.NewRequest("POST", url, nil)

                                                                    req.Header.Add("content-type", "application/x-www-form-urlencoded")
                                                                    req.Header.Add("apikey", "your apikey")
                                                                    req.Header.Add("cache-control", "no-cache")

                                                                    res, _ := http.DefaultClient.Do(req)

                                                                    defer res.Body.Close()
                                                                    body, _ := ioutil.ReadAll(res.Body)

                                                                    fmt.Println(res)
                                                                    fmt.Println(string(body))

                                                                    }




                                                                
                                                        
 
                                                            
                                                                    curl -X POST \
                                                                    https://api.ghasedak.me/v2/account/info \
                                                                    -H 'apikey: your apikey' \
                                                                    -H 'cache-control: no-cache' \
                                                                    -H 'content-type: application/x-www-form-urlencoded' \


                                                                  
                                                                
                                                        
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 200,
                                                                            "message": "success"
                                                                        },
                                                                         "items": {
                                                                            "balance": 8880,
                                                                            "expire": "2524608000"
                                                                        }
                                                                    }
                                                                
                                                    
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 400,
                                                                        "message": "[\"apikey is required\"]"
                                                                    },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 401,
                                                                        "message": "apikey is invalid"
                                                                },
                                                                    "items": null
                                                                }
                                                            
                                                        
 
                                                            
                                                                {
                                                                    "result": {
                                                                        "code": 404,
                                                                        "message": "the requested resource does not exist"
                                                                },
                                                                    "items": ""
                                                                }
                                                            
                                                        
 
                                                            
                                                                    {
                                                                        "result": {
                                                                            "code": 419,
                                                                            "message": "error! Exception"
                                                                    },
                                                                        "items": [
                                                                            10
                                                                        ]
                                                                    }