Šablony API s C Sharp

Spravujte všechny své šablony účtů, vytvářejte šablony pro SMS nebo e-mail z našeho API.

Přidat šablonu s C Sharp

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+"\"}");
Parametr Popis Povinné / Nepovinné
class=template Požadovaná třída: Třída, na kterou je žádost podána Povinný
method=addtemplate Požadovaná metoda třídy: Metoda třídy, které je žádost podána Povinný
user Uživatel a e-mail vašeho účtu Afilnet Povinný
password Heslo vašeho účtu Afilnet Povinný
title Název zprávy Povinný
message Zpráva Povinný
type Typ zprávy (Možné hodnoty: mobile, whatsapp nebo email) Povinný
Odpovědět:
  • postavení
  • výsledek (pokud status = úspěch), zde obdržíte následující hodnoty:
    • Nebudou vám zasílány žádné další hodnoty
  • chyba (pokud status = chyba), zde obdržíte kód chyby

Kódy chyb:
Kód Popis
MISSING_USER Uživatel nebo e-mail nejsou zahrnuty
MISSING_PASSWORD Heslo není zahrnuto
MISSING_CLASS Třída není zahrnuta
MISSING_METHOD Metoda není zahrnuta
MISSING_COMPULSORY_PARAM Povinný parametr není zahrnut
INCORRECT_USER_PASSWORD Nesprávný uživatel nebo heslo
INCORRECT_CLASS Nesprávná třída
INCORRECT_METHOD Nesprávná metoda

Získejte šablony s C Sharp

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+"\"}");String afilnet_class="template";
String afilnet_method="gettemplates";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_type="mobile";
String afilnet_start="0";

// 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+"&type="+afilnet_type+"&start="+afilnet_start);
	
// 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"] = "gettemplates";
data["user"] = "user";
data["password"] = "password";
data["type"] = "mobile";
data["start"] = "0";

// 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"] = "gettemplates";
data["type"] = "mobile";
data["start"] = "0";

// 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="gettemplates";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_type="mobile";
String afilnet_start="0";
	
// 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, "{\"type\":\""+afilnet_type+"\",\"start\":\""+afilnet_start+"\"}");
Parametr Popis Povinné / Nepovinné
class=template Požadovaná třída: Třída, na kterou je žádost podána Povinný
method=gettemplates Požadovaná metoda třídy: Metoda třídy, které je žádost podána Povinný
user Uživatel a e-mail vašeho účtu Afilnet Povinný
password Heslo vašeho účtu Afilnet Povinný
type Typ zprávy (Možné hodnoty: mobile, whatsapp nebo email) Volitelný
start Výsledky jsou vráceny za 50 s, musíte zde uvést offset Volitelný
Odpovědět:
  • postavení
  • výsledek (pokud status = úspěch), zde obdržíte následující hodnoty:
    • Nebudou vám zasílány žádné další hodnoty
  • chyba (pokud status = chyba), zde obdržíte kód chyby

Kódy chyb:
Kód Popis
MISSING_USER Uživatel nebo e-mail nejsou zahrnuty
MISSING_PASSWORD Heslo není zahrnuto
MISSING_CLASS Třída není zahrnuta
MISSING_METHOD Metoda není zahrnuta
MISSING_COMPULSORY_PARAM Povinný parametr není zahrnut
INCORRECT_USER_PASSWORD Nesprávný uživatel nebo heslo
INCORRECT_CLASS Nesprávná třída
INCORRECT_METHOD Nesprávná metoda

Získejte šablonu pomocí jazyka C Sharp

String afilnet_class="template";
String afilnet_method="gettemplates";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_type="mobile";
String afilnet_start="0";
	
// 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, "{\"type\":\""+afilnet_type+"\",\"start\":\""+afilnet_start+"\"}");String afilnet_class="template";
String afilnet_method="gettemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idtemplate="1000";

// 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+"&idtemplate="+afilnet_idtemplate);
	
// 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"] = "gettemplate";
data["user"] = "user";
data["password"] = "password";
data["idtemplate"] = "1000";

// 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"] = "gettemplate";
data["idtemplate"] = "1000";

// 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="gettemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idtemplate="1000";
	
// 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, "{\"idtemplate\":\""+afilnet_idtemplate+"\"}");
Parametr Popis Povinné / Nepovinné
class=template Požadovaná třída: Třída, na kterou je žádost podána Povinný
method=gettemplate Požadovaná metoda třídy: Metoda třídy, které je žádost podána Povinný
user Uživatel a e-mail vašeho účtu Afilnet Povinný
password Heslo vašeho účtu Afilnet Povinný
idtemplate identifikátor šablony Povinný
Odpovědět:
  • postavení
  • výsledek (pokud status = úspěch), zde obdržíte následující hodnoty:
    • Nebudou vám zasílány žádné další hodnoty
  • chyba (pokud status = chyba), zde obdržíte kód chyby

Kódy chyb:
Kód Popis
MISSING_USER Uživatel nebo e-mail nejsou zahrnuty
MISSING_PASSWORD Heslo není zahrnuto
MISSING_CLASS Třída není zahrnuta
MISSING_METHOD Metoda není zahrnuta
MISSING_COMPULSORY_PARAM Povinný parametr není zahrnut
INCORRECT_USER_PASSWORD Nesprávný uživatel nebo heslo
INCORRECT_CLASS Nesprávná třída
INCORRECT_METHOD Nesprávná metoda

Smazat šablonu pomocí C Sharp

String afilnet_class="template";
String afilnet_method="gettemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idtemplate="1000";
	
// 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, "{\"idtemplate\":\""+afilnet_idtemplate+"\"}");String afilnet_class="template";
String afilnet_method="deletetemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idtemplate="1000";

// 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+"&idtemplate="+afilnet_idtemplate);
	
// 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"] = "deletetemplate";
data["user"] = "user";
data["password"] = "password";
data["idtemplate"] = "1000";

// 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"] = "deletetemplate";
data["idtemplate"] = "1000";

// 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="deletetemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idtemplate="1000";
	
// 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, "{\"idtemplate\":\""+afilnet_idtemplate+"\"}");
Parametr Popis Povinné / Nepovinné
class=template Požadovaná třída: Třída, na kterou je žádost podána Povinný
method=deletetemplate Požadovaná metoda třídy: Metoda třídy, které je žádost podána Povinný
user Uživatel a e-mail vašeho účtu Afilnet Povinný
password Heslo vašeho účtu Afilnet Povinný
idtemplate Identifikátor šablony Povinný
Odpovědět:
  • postavení
  • výsledek (pokud status = úspěch), zde obdržíte následující hodnoty:
    • Nebudou vám zasílány žádné další hodnoty
  • chyba (pokud status = chyba), zde obdržíte kód chyby

Kódy chyb:
Kód Popis
MISSING_USER Uživatel nebo e-mail nejsou zahrnuty
MISSING_PASSWORD Heslo není zahrnuto
MISSING_CLASS Třída není zahrnuta
MISSING_METHOD Metoda není zahrnuta
MISSING_COMPULSORY_PARAM Povinný parametr není zahrnut
INCORRECT_USER_PASSWORD Nesprávný uživatel nebo heslo
INCORRECT_CLASS Nesprávná třída
INCORRECT_METHOD Nesprávná metoda
NOT_ACCESS_TO_TEMPLATE K vybrané šabloně nemáte přístup
ERROR_ASSIGNED_EVENT nemůžete smazat skupinu, protože k této skupině existují události

Vrátí stav doručení certifikované SMS s PHP Vrátí stav doručení certifikované SMS s Java Vrátí stav doručení certifikované SMS s C Sharp Vrátí stav doručení certifikované SMS s Unix Vrátí stav doručení certifikované SMS s Ruby on Rails Vrátí stav doručení certifikované SMS s Python Vrátí stav doručení certifikované SMS s Android Vrátí stav doručení certifikované SMS s Objective C / iPhone Vrátí stav doručení certifikované SMS s SQL Server Vrátí stav doručení certifikované SMS s Oracle Vrátí stav doručení certifikované SMS s Node JS Vrátí stav doručení certifikované SMS s Go lang Vrátí stav doručení certifikované SMS s Scala lang Vrátí stav doručení certifikované SMS s Swift Vrátí stav doručení certifikované SMS s Delphi

Afilnet vám nabízí způsoby, jak zlepšit bezpečnost při používání našeho API s C Sharp, díky možnosti vytváření přístupů a možnosti aktivace filtrování podle IP.

Které rozhraní API pro jazyk C Sharp mám použít?

Objevte výhody a nevýhody každého z našich API. Zjistěte, které API je pro váš software nejlepší v jazyce C Sharp.

Toto rozhraní API vám umožňuje připojit se k nám z C Sharp a odesílat požadavky prostřednictvím požadavků HTTP GET. Tento požadavek odešle parametry ve stejné adrese URL jako požadavek.

  • HTTP GET se velmi jednoduše implementuje
  • Informace jsou odesílány nešifrované (hesla mohou být extrahována z protokolů nebo mezipaměti)
  • Maximální požadavek na ~4000 znaků

Rozhraní API požadavku POST vám umožňuje připojit se k našemu rozhraní API z C Sharp odesláním parametrů požadavku prostřednictvím parametrů HTTP POST. Informace jsou odesílány nezávisle na URL.

  • HTTP POST se snadno implementuje
  • Informace jsou odesílány šifrovaně
  • Velikost požadavku není nijak omezena
  • Střední zabezpečení

Základní autentizační API umožňuje použití požadavků GET a POST v C Sharp s další vrstvou zabezpečení, protože v tomto případě se uživatelské jméno a heslo zasílají v záhlaví požadavku.

  • Základní autentizace se snadno implementuje
  • Přístupová data jsou odesílána šifrovaná
  • Limit velikosti závisí na použití GET nebo POST
  • Střední zabezpečení

SOAP umožňuje posílat požadavky ve formátu XML s C Sharp, SOAP přidává další vrstvu zabezpečení žádostem API.

  • Integrace SOAP je složitější
  • Informace jsou odesílány šifrovaně
  • Velikost požadavku není nijak omezena
  • Střední / vysoká bezpečnost

Naše JSON API vám umožňuje odesílat požadavky ve formátu JSON s C Sharp, navíc toto API přidává do ověřování protokol oAuth 2.0, který vám umožňuje přidat další vrstvu zabezpečení.

  • Integrace JSON oAuth 2.0 je složitější
  • Informace jsou odesílány šifrovaně
  • Velikost požadavku není nijak omezena
  • Vysoká bezpečnost

Propojte C Sharp s naším ŠABLONY API

01

Zaregistrujte se jako klient

Abyste měli přístup k API, musíte být klientem Afilnetu. Registrace zabere několik minut.

02

Požádejte o bezplatnou zkušební verzi

Naše společnost vám nabídne zkušební zůstatek, který vám umožní testovat s API, které potřebujete.

03

Integrujte rozhraní API

Proveďte integraci API pomocí programovacího jazyka dle vašeho výběru. Pokud máte nějaké dotazy nebo návrhy ohledně API, kontaktujte nás

04

Vítejte v Afilnetu!

Vše připraveno !, se podařilo zlepšit komunikaci s Afilnet. Jsme tu, abychom podporovali naše API, když to potřebujete


V případě dotazů kontaktujte náš tým prostřednictvím kontaktních metod, které nabízíme. Náš tým se vám pokusí nabídnout okamžité řešení a pomůže vám s integrací našeho API do vašeho softwaru.

Vyzkoušejte Afilnet zdarma!

Zaregistrujte se zdarma a vyzkoušejte Afilnet! Nabízíme vám bezplatnou zkušební verzi našich služeb. *



(*) Akce platí pouze pro společnosti, které nikdy předtím službu Afilnet nevyužívaly. Při žádosti o bezplatný zůstatek může Afilnet požádat o ověření informací o vaší společnosti


Hromadná SMS · Emailový marketing · Sociální síť · Okamžité zprávy · Osvědčení · a mnohem víc
Pokračovat DŮLEŽITÉ INFORMACE O COOKIES: Pokud budete i nadále používat tento web, budeme předpokládat, že souhlasíte s podmínkami použití. Více informací naleznete v našich Zásadách používání cookies.
Platební metody
Drátový převod
Kreditní karta
Paypal
Western Union
Skrill
Crypto
Afilnet ve vašem jazyce

Copyright © 2023 Afilnet · Všechna práva vyhrazena