C Sharp ile şablon ekle
C Sharp ile bir şablon ekle
C Sharp : YÖNTEMLER
SMS
- C Sharp ile SMS gönder
- C Sharp ile şablondan SMS gönder
- C Sharp ile toplu SMS gönder
- C Sharp ile şablondan Toplu SMS gönder
- C Sharp ile SMS gönderim durumunu al
KONUŞMA METNİ
- C Sharp ile sesli metinden konuşmaya gönder
- C Sharp ile şablondan ses gönder
- C Sharp ile toplu ses gönderin
- C Sharp ile şablondan toplu ses gönderin
- C Sharp ile sesli yayın durumunu al
E-POSTA
- C Sharp ile e-posta gönder
- C Sharp ile şablondan e-posta gönder
- C Sharp ile toplu e-posta gönder
- C Sharp ile şablondan Toplu E-posta gönder
- C Sharp ile e-posta teslim durumunu al
SOSYAL AğLAR
GRUPLARI
- C Sharp ile grup oluştur
- C Sharp ile grup alanı listesini al
- C Sharp ile bir gruba alan ekleyin
- C Sharp ile bir gruptan alan silme
- Gruptaki bir kişiyi silme
- Ülkeyi C Sharp ile e grubuna atama
- C Sharp ile grup irtibat listesini al
- C Sharp ile bir gruba kişi ekleyin
- Bir grubun kişisini C Sharp ile değiştirin
- C Sharp ile bir grubun kişisini sil
HLR
ÜLKELER
ETKİNLİKLER
- C Sharp olan bir gruba etkinlik ekle
- C Sharp ile grup etkinliklerini alın
- C Sharp ile bir grubun etkinliğini sil
KULLANıCı
ŞABLONLAR
OTP (BIR KEZ ŞIFRE)
String afilnet_class="template";
String afilnet_method="addtemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_title="title test";
String afilnet_message="title message";
String afilnet_type="mobile";
// Create an URL request
WebRequest request = WebRequest.Create("https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&title="+afilnet_title+"&message="+afilnet_message+"&type="+afilnet_type);
// Get the response
WebResponse response = request.GetResponse ();
// Get the stream returned by the server
Stream dataStream = response.GetResponseStream();
// Open the stream
StreamReader reader = new StreamReader (dataStream);
// Read the Response
String result = reader.ReadToEnd ();
// Asign vars
var data = new NameValueCollection();
data["class"] = "template";
data["method"] = "addtemplate";
data["user"] = "user";
data["password"] = "password";
data["title"] = "title test";
data["message"] = "title message";
data["type"] = "mobile";
// Create Web client
var wb = new WebClient();
// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);
// Get response
string responseString = Encoding.UTF8.GetString(response);
// Asign vars
var data = new NameValueCollection();
data["class"] = "template";
data["method"] = "addtemplate";
data["title"] = "title test";
data["message"] = "title message";
data["type"] = "mobile";
// Create Web client
var wb = new WebClient { Credentials = new NetworkCredential("user", "password") };
// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);
// Get response
string responseString = Encoding.UTF8.GetString(response); String afilnet_class="template";
String afilnet_method="addtemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_title="title test";
String afilnet_message="title message";
String afilnet_type="mobile";
// Allow SSL/TLS config
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
// We create the webservice instance (Register Web Service first in project)
var service = new WebService.ApplicationServicesPortTypeClient();
// Call to WebService method
String response = service.call(afilnet_user, afilnet_password, afilnet_class, afilnet_method, "{\"title\":\""+afilnet_title+"\",\"message\":\""+afilnet_message+"\",\"type\":\""+afilnet_type+"\"}"); Yeni bir şablon ekler
| Parametre | Açıklama | Zorunlu / Seçmeli |
|---|---|---|
| class=template | İstenen sınıf: İsteğin yapıldığı sınıf | Zorunlu |
| method=addtemplate | İstenen sınıf yöntemi: İsteğin yapıldığı sınıfın yöntemi | Zorunlu |
| user | Afilnet hesabınızın kullanıcısı ve e-postası | Zorunlu |
| password | Afilnet hesabınızın şifresi | Zorunlu |
| title | Mesaj başlığı | Zorunlu |
| message | Mesaj | Zorunlu |
| type | Mesaj türü (olası değerler: mobil veya e-posta) | Zorunlu |
İstek yaptığınızda aşağıdaki alanları alacaksınız:
- status
- sonuç (eğer durum = başarı ise), aşağıdaki değerleri alacaksınız:
- Size başka hiçbir değer gönderilmeyecek
- hata (eğer durum = hata ise), burada hata kodunu alacaksınız
Muhtemel hata kodları aşağıda listelenmiştir.
| kod | Açıklama |
|---|---|
| MISSING_USER | Kullanıcı veya e-posta dahil değil |
| MISSING_PASSWORD | Şifre dahil değil |
| MISSING_CLASS | Sınıf dahil değil |
| MISSING_METHOD | Yöntem dahil değil |
| MISSING_COMPULSORY_PARAM | Zorunlu parametre dahil değil |
| INCORRECT_USER_PASSWORD | Yanlış kullanıcı veya şifre |
| INCORRECT_CLASS | Yanlış sınıf |
| INCORRECT_METHOD | Yanlış yöntem |
Parametreler:
- class: template
- method: addtemplate
- user: user
- password: password
- title: title test
- message: title message
- type: mobile
İstek:
https://www.afilnet.com/api/http/?class=template&method=addtemplate&user=user&password=password&title=title+test&message=title+message&type=mobile















