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

ارسال تکی

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

آدرس وب سرویس

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
messagestring
Required
متنی که باید ارسال شود .
receptorstring
Required
شماره گیرنده پیام می باشد .
linenumberstring
Required
شماره فرستنده پیام می باشد ، که اگر قید نشود از بین خطوط اختصاصی شما خط با اولویت بالاتر انتخاب می شود.

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

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

نمونه کد

                                                            
                                                                    GhasedakIOClient Client = new GhasedakIOClient();
                                                                    string apikey = "your apikey";
                                                                    string message = "test";
                                                                    string receptor = "09111111111";
                                                                    string linenumber = "5000222";
                                                                    string senddate = null;
                                                                    string checkid = null;
                                                                    SendSimpleResponse SendSimple = await Client.SendSimpleAsync(apikey, message, receptor, linenumber, senddate, checkid);
                                                                
                                                    
 
                                                            
                                                              
                                                            
                                                        
 
                                                            
                                                               
                                                            
                                                        
 
                                                            
                                                                   

                                                                
                                                        
 
                                                            
                                                              

                                                            
                                                        
 
                                                            


                                                            
                                                        
 
                                                            
                                                              
                                                            
                                                        
                                                            
                                                                {
                                                                    "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امکان استفاده از این سرویس در پلن رایگان وجود ندارد.

ارسال تکی 2

از این متد برای ارسال پیامک با استفاده از نام کاربری و پسورد به صورت تکی و ساده استفاده می شود.
برای استفاده از این متد کافی است به جای پارامتر username نام کاربری خود و به جای پارامتر password مقدار apikey حساب خود را جایگزین نمایید .

آدرس وب سرویس

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

ParameterFormatDescription
usernamestring
Required
Body
نام کاربری حساب کاربری خود را وارد نمایید.
passwordstring
Required
Body
در این پارمتر باید مقدار apikey خود را وارد نمایید . بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
messagestring
Required
متنی که باید ارسال شود .
receptorstring
Required
شماره گیرنده پیام می باشد .
linenumberstring
Required
شماره فرستنده پیام می باشد ، که اگر قید نشود از بین خطوط اختصاصی شما خط با اولویت بالاتر انتخاب می شود.

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

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

نمونه کد

                                                            
                                                                    GhasedakIOClient Client = new GhasedakIOClient();
                                                                    string username = "your username";
                                                                    string password = "your apikey";
                                                                    string message = "test";
                                                                    string receptor = "09111111111";
                                                                    string linenumber = "5000222";
                                                                    string senddate = null;
                                                                    string checkid = null;
                                                                    SendSimpleResponse SendSimple = await Client.SendSimpleByUrlAsync(apikey, message, receptor, linenumber, senddate, checkid);
                                                                
                                        
 
                                                            
                                                  
                                                
                                            
 
                                                            
                                                   
                                                
                                            
 
                                                            
                                                       

                                                    
                                            
 
                                                            
                                                  

                                                
                                            
 
                                                            


                                                
                                            
 
                                                            
                                                  
                                                
                                            
                                                            
                                                    {
                                                        "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امکان استفاده از این سرویس در پلن رایگان وجود ندارد.

ارسال گروهی

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

آدرس وب سرویس

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
messagestring
Required
متونی که باید ارسال شوند که با ( , ) از هم جدا می شوند . (..,test1,test2)
receptorstring
Required
شماره گیرندگان پیام که با ( , ) از هم جدا می شوند . (..,09121111111,09122222222)
linenumberstring
Required
شماره فرستندگان پیام که با ( , ) از هم جدا می شوند . (..,5000110,5000100)
senddatestringتاریخ و زمان دقیق ارسال پیام بر اساس Unixtime که با ( , ) از هم جدا می شوند که اگر قید نشود در همان لحظه پیام ارسال می شود . (..,1508144471,1508144471)
checkidstringبرای تعیین شماره ای یکتا از طرف کاربر برای هر پیامک به کار می رود که با ( , ) از هم جدا می شوند و پس از ارسال پیامک می توان با متد staus کلیه اطلاعات پیام ارسال شده را دریافت کرد .

نمونه کد

                                                            
                                                                    GhasedakIOClient Client = new GhasedakIOClient();

                                                                    string apikey = "your apikey";
                                                                    string message = " test1 , test2 ";
                                                                    string receptor = " 09111111111 , 09111111112 ";
                                                                    string linenumber = " 5000222 , 5000222 ";
                                                                    string senddate = " 1508144471 , 1508144475 ";
                                                                    string checkid = " 2020 , 2021 ";

                                                                    SendBulkResponse SendBulk = await Client.SendBulkAsync(apikey, message, receptor, linenumber, senddate, checkid);
                                                                
                                                    
 
                                                            
                                                                  

                                                                
                                                        
 
                                                            
                                                             
                                                            
                                                        
 
                                                            
                                                                  
                                                                 
                                                                
                                                        
 
                                                            
                                                                  
                                                                
                                                        
 
                                                            

                                                                  
                                                                
                                                        
 
                                                            
                                                               
                                                                
                                                        
                                                            
                                                                    {
                                                                        "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

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

آدرس وب سرویس

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
messagestring
Required
متنی که باید ارسال شود .
receptorstring
Required
شماره گیرندگان پیام که با ( , ) از هم جدا می شوند . (..,09121111111,09122222222)
linenumberstring
Required
شماره فرستنده پیام می باشد ، که اگر فید نشود از بین خطوط شما خط با اولویت بالاتر انتخاب می شود .
senddatestringتاریخ و زمان دقیق ارسال پیام بر اساس Unixtime می باشد که اگر قید نشود در همان لحظه پیام ارسال می شود . (1508144471)
checkidstringبرای تعیین شماره ای یکتا از طرف کاربر برای هر پیامک به کار می رود که با ( , ) از هم جدا می شوند و پس از ارسال پیامک می توان با متد staus کلیه اطلاعات پیام ارسال شده را دریافت کرد .

نمونه کد

                                                            
                                                                    GhasedakIOClient Client = new GhasedakIOClient();
                                                                    string apikey = "your apikey";
                                                                    string message = " test1  ";
                                                                    string receptor = " 09111111111 , 09111111112 ";
                                                                    string linenumber = " 5000222  ";
                                                                    string senddate = " 1508144471";
                                                                    string checkid = " 2020 , 2021 ";
                                                                    SendBulk2Response SendBulk = await Client.SendBulk2Async(apikey, message, receptor, linenumber, senddate, checkid);

                                                                
                                                    
 
                                                            
                                                                 
                                                                
                                                        
 
                                                            
                                                                
                                                                
                                                        
 
                                                            
                                                                  

                                                                
                                                        
 
                                                            

                                                                  

                                                                
                                                        
 
                                                            
                                                                 
                                                                
                                                        
 
                                                            

                                                                 
                                                                
                                                        
                                                            
                                                                    {
                                                                        "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 ) شروع کنید.
تعرفه های بین المللی را می توانید در صفحه تعرفه ها مشاهده نمایید.

آدرس وب سرویس

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
receptorstring
Required
شماره گیرندگان پیام که با ( , ) از هم جدا می شوند . (..,09121111111,09122222222)
typeint
Required
برای ارسال پیام متنی type=1 و برای ارسال پیام صوتی type=2 قرار دهید .
templatestring
Required
عنوان قالبی که در پنل خود ایجاد کرده اید .
checkidstringبرای تعیین شماره ای یکتا از طرف کاربر برای هر پیامک به کار می رود و پس از ارسال پیامک می توان با متد staus کلیه اطلاعات پیام ارسال شده را دریافت کرد .
param1string
Required
مقادیری که از سمت شما وارد می شود ، وارد کردن حداقل 1 مورد اجباری است .
param2string
مقادیری که از سمت شما وارد می شود .
param3string
مقادیری که از سمت شما وارد می شود .
param4string
مقادیری که از سمت شما وارد می شود .
param5string
مقادیری که از سمت شما وارد می شود .
param6string
مقادیری که از سمت شما وارد می شود .
param7string
مقادیری که از سمت شما وارد می شود .
param8string
مقادیری که از سمت شما وارد می شود .
param9string
مقادیری که از سمت شما وارد می شود .
param10string
مقادیری که از سمت شما وارد می شود .

نمونه کد

                                                            
                                                                    GhasedakIOClient Client = new GhasedakIOClient();
                                                                    string apikey = "your apikey";
                                                                    string receptor = " 09111111111 , 09111111112 ";
                                                                    int type = 1;
                                                                    string template = " test1";
                                                                    string param1 = " testparam ";
                                                                    string param2 = " testparam ";
                                                                    string param3 = " testparam ";
                                                                    string param4 = " testparam ";
                                                                    string param5 = " testparam ";
                                                                    string param6 = " testparam ";
                                                                    string param7 = " testparam ";
                                                                    string param8 = " testparam ";
                                                                    string param9 = " testparam ";
                                                                    SendOTPResponse SendOTP = await Client.SendOTPAsync(apikey, receptor, type, template, param1, param2, param3, param4, param5, param6, param7, param8, param9);

                                                                
                                                    
 
                                                            
                                                                

                                                                
                                                        
 
                                                            

                                                                  


                                                                
                                                        
 
                                                            


                                                                 
                                                                
                                                        
 
                                                            

                                                                  
                                                                
                                                        
 
                                                            

                                                                 

                                                                
                                                        
 
                                                            
                                                                  

                                                                
                                                        
                                                            
                                                                    {
                                                                        "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
                                                                        ]
                                                                    }
                                                                
                                                        

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

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

آدرس وب سرویس

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
messagestring
Required
متنی که باید ارسال شود .
receptorstring
Required
شماره گیرندگان پیام که با ( , ) از هم جدا می شوند . (..,09121111111,09122222222)
senddatestring
Required
تاریخ و زمان دقیق ارسال پیام بر اساس Unixtime می باشد که اگر قید نشود در همان لحظه پیام ارسال می شود . (1508144471)

نمونه کد

                                                            

                                                                    GhasedakIOClient Client = new GhasedakIOClient();
                                                                    string apikey = "your apikey";
                                                                    string message = "test";
                                                                    string receptor = "09111111111";
                                                                    string senddate = null;
                                                                    SendVoiceResponse SendSimple = await Client.SendVoiceAsync(apikey, message, receptor, senddate);

                                                                
                                                    
 
                                                            
                                                                 

                                                                
                                                        
 
                                                            

                                                            
                                                                    


                                                                
                                                        
 
                                                            
                                                                  




                                                                  



                                                                
                                                        
 
                                                            
                                                                

                                                                   



                                                                
                                                        
 
                                                            
                                                                 

                                                                
                                                        
 
                                                            

                                                                 
                                                                

                                                                
                                                        
                                                            
                                                                    {
                                                                        "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 پیامک را دریافت کند . مقدار بازگشتی این متد می توانید مقدار صحیح شامل یکی از اعداد زیر باشد:

آدرس وب سرویس

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
idstring
Required
شناسه پیامک که با ( , ) ازهم جدا می شوند.
typestring
Required
نوع id پیام را مشخص می کند ( 1 برای messageid و 2 برای checkid )

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

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

نمونه کد

                                                            

                                                                    GhasedakIOClient Client = new GhasedakIOClient();
                                                                    string apikey = "your apikey";
                                                                    string id = "2581227073";
                                                                    string type = "1";
                                                                    GetStatusResponse SendSimple = await Client.GetStatusAsync(apikey, id, type);


                                                                
                                                    
 
                                                            
                                                                  

                                                                   
                                                                
                                                        
 
                                                            
                                                                  

                                                                
                                                        
 
                                                            

                                                                


                                                                   

                                                                
                                                        
 
                                                            
                                                                  

                                                                 

                                                                
                                                        
 
                                                            
                                                                   
                                                                
                                                        
                                                            
                                                                    {
                                                                    "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
                                                                        ]
                                                                    }
                                                                
                                                        

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

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

آدرس وب سرویس

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
namestring
Required
نام گروه
parentint
اگر مقدار 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
                                                                        ]
                                                                    }
                                                                
                                                        

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

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

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
groupidint
Required
شماره گروه که به هنگام ثبت گروه دریافت شده است .
numberstring
Required
شماره تلفن مخاطبین که با ( , ) از هم جدا می شوند . (..,09121111111,09122222222)
firstnamestring
نام تلفن مخاطبین که با ( , ) از هم جدا می شوند
lastnamestring
نام خانوادگی تلفن مخاطبین که با ( , ) از هم جدا می شوند
emailstring
ایمیل تلفن مخاطبین که با ( , ) از هم جدا می شوند

نمونه کد

                                                            
                                                                    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
                                                                        ]
                                                                    }
                                                                
                                                        

لیست گروه ها

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

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
parentint
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
                                                                        ]
                                                                    }
                                                                
                                                        

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

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

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
groupidint
Required
شماره گروه که به هنگام ثبت گروه دریافت شده
offsetint
دسته بندی لیست مخاطبین به تعداد offset داده شده انجام می گیرد ، که اگر قید نشود مقدار آن (offset=100) در نظر گرفته می شود .
pageint
صفحه مورد نظر از لیست مخاطبین ، اگر مقدار داده نشود (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
                                                                        ]
                                                                    }
                                                                
                                                        

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

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

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
groupidint
Required
شماره گروه که به هنگام ثبت گروه دریافت شده
namestring
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
                                                                        ]
                                                                    }
                                                                
                                                        

حذف گروه

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

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
groupidint
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
                                                                        ]
                                                                    }
                                                                
                                                        

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

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

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
groupidint
Required
شماره گروه که به هنگام ثبت گروه دریافت شده
idsint
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 پیام بازگردانده می شود.

آدرس وب سرویس

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
linenumberString
Required
شماره خط
isreadint
Required
اگر (0) وارد شود پیام های خوانده نشده و اگر (1) وارد شود پیام های خوانده شده بر می گردد.

نمونه کد

                                                            
                                                                    GhasedakIOClient Client = new GhasedakIOClient();
                                                                    string apikey = "your apikey";
                                                                    string id = "2581227073";
                                                                    int isread = 1;
                                                                    ReceiveLastResponse SendSimple = await Client.ReceiveLastAsync(apikey, id, isread);
                                                                
                                                    
 
                                                            

                                                                  

                                                                
                                                        
 
                                                            






                                                                







                                                                
                                                        
 
                                                            

                                                                
                                                                
                                                        
 
                                                            

                                                                  
                                                        
 
                                                            
                                                                  
                                                                
                                                        
 
                                                            
                                                                  
                                                                
                                                        
                                                            
                                                                    {
                                                                        "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 پیام بازگردانده می شود.

آدرس وب سرویس

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
linenumberString
Required
شماره خط
isreadint
Required
اگر (0) وارد شود پیام های خوانده نشده و اگر (1) وارد شود پیام های خوانده شده بر می گردد.
fromdateString
Required
تاریخ و زمان دقیق شروع ارسال پیام بر اساس Unixtime می باشد.
todateString
Required
تاریخ و زمان دقیق پایان ارسال پیام بر اساس Unixtime می باشد.
pageint
Required
صفحه مورد نظر را وارد کنید، صفحه اول 0 می باشد.
offsetint
Required
تعداد پیام بازگشتی در هر صفحه ، حداکثر تعداد 200 می باشد.

نمونه کد

                                                            
                                                                    GhasedakIOClient Client = new GhasedakIOClient();
                                                                    string apikey = "your apikey";
                                                                    string id = "2581227073";
                                                                    int isread = 1;
                                                                    string fromdate = "2581227073";
                                                                    string todate = "2581227073";
                                                                    int page = 0;
                                                                    int offset = 200;
                                                                    ReceivePagingResponse SendSimple = await Client.ReceivePagingAsync(apikey, id, isread, fromdate, todate, page, offset);
                                                                
                                                    
 
                                                            




                                                                   
                                                                
                                                        
 
                                                            


                                                                 







                                                                
                                                        
 
                                                            

                                                                  
                                                                
                                                        
 
                                                            
                                                                 
                                                                
                                                        
 
                                                            
                                                                 
                                                                 
                                                                
                                                        
 
                                                            
                                                                   
                                                                 
                                                                
                                                        
                                                            
                                                                    {
                                                                        "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
                                                                        ]
                                                                    }
                                                                
                                                        

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

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

آدرس وب سرویس

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

ParameterFormatDescription
apikeystring
Required
Header
apikey بعد از وارد شدن به پنل حساب کاربری خود در قسمت تنظیمات حساب کاربری می توانید کد apikey را مشاهده نمایید.
messageidString
Required
شناسه پیامک که با ( , ) ازهم جدا می شوند .

نمونه کد

                                                            
                                                                    GhasedakIOClient Client = new GhasedakIOClient();
                                                                    string apikey = "your apikey";
                                                                    string messageid = "2581227073,2581427073";
                                                                    ReceiveCancelResponse SendSimple = await Client.ReceiveCancelAsync(apikey, messageid);
                                                                
                                                    
 
                                                            


                                                                  
                                                                
                                                        
 
                                                            


                                                                 


                                                                
                                                        
 
                                                            



                                                                
                                                        
 
                                                            
                                                                  
                                                                
                                                        
 
                                                            
                                                                


                                                                
                                                        
 
                                                            

                                                                
                                                        
                                                            
                                                                    {
                                                                        "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
                                                                        ]
                                                                    }
                                                                
                                                        

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

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

آدرس وب سرویس

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

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

نمونه کد

                                                            
                                                                    GhasedakIOClient Client = new GhasedakIOClient();
                                                                    string apikey = "your apikey";
                                                                    GetInfoResponse SendSimple = await Client.GetInfoAsync(apikey);

                                                                
                                                    
 
                                                            

                                                                   



                                                                
                                                        
 
                                                            

                                                              





                                                                
                                                        
 
                                                            
                                                                 



                                                                
                                                        
 
                                                            

                                                               
                                                                   
                                                                
                                                        
 
                                                            
                                                                  
                                                                
                                                        
 
                                                            
                                                                
                                                                  
                                                                
                                                        
                                                            
                                                                    {
                                                                        "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
                                                                        ]
                                                                    }