Web Chat API pro C Sharp

Spravujte chatovací systém z API. Přístup nebo odpověď na konverzace z našeho API.

Získejte seznam aktivních chatovacích kanálů s jazykem C Sharp

String afilnet_class="chat";
String afilnet_method="getchatchannels";
String afilnet_user="user";
String afilnet_password="password";

// 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);
	
// 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"] = "chat";
data["method"] = "getchatchannels";
data["user"] = "user";
data["password"] = "password";

// 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"] = "chat";
data["method"] = "getchatchannels";

// 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="chat";
String afilnet_method="getchatchannels";
String afilnet_user="user";
String afilnet_password="password";
	
// 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, "{}");
Parametr Popis Povinné / Nepovinné
class=chat Požadovaná třída: Třída, na kterou je žádost podána Povinný
method=getchatchannels 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ý
Odpovědět:
  • postavení
  • výsledek (pokud status = úspěch), zde obdržíte následující hodnoty:
    • list
      • platformid
      • platform
      • name
  • 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

Odeslat zprávu prostřednictvím chatu s jazykem C Sharp

String afilnet_class="chat";
String afilnet_method="getchatchannels";
String afilnet_user="user";
String afilnet_password="password";
	
// 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, "{}");String afilnet_class="chat";
String afilnet_method="sendmessage";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="3460000000";
String afilnet_message="test+message";

// 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+"&platform="+afilnet_platform+"&platformid="+afilnet_platformid+"&destination="+afilnet_destination+"&message="+afilnet_message);
	
// 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"] = "chat";
data["method"] = "sendmessage";
data["user"] = "user";
data["password"] = "password";
data["platform"] = "whatsapp";
data["platformid"] = "100";
data["destination"] = "3460000000";
data["message"] = "test+message";

// 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"] = "chat";
data["method"] = "sendmessage";
data["platform"] = "whatsapp";
data["platformid"] = "100";
data["destination"] = "3460000000";
data["message"] = "test+message";

// 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="chat";
String afilnet_method="sendmessage";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="3460000000";
String afilnet_message="test+message";
	
// 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, "{\"platform\":\""+afilnet_platform+"\",\"platformid\":\""+afilnet_platformid+"\",\"destination\":\""+afilnet_destination+"\",\"message\":\""+afilnet_message+"\"}");
Parametr Popis Povinné / Nepovinné
class=chat Požadovaná třída: Třída, na kterou je žádost podána Povinný
method=sendmessage 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ý
platform Platforma, na kterou je zpráva odeslána. Možné hodnoty: 'webchat', 'whatsapp', 'telegram', 'operátor' Povinný
platformid Identifikátor platformy Povinný
destination Příjemce, kam je zpráva chatu odeslána Povinný
message Zpráva k odeslání prostřednictvím chatu 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
CHANNEL_NOT_FOUND Uvedený kanál neexistuje

Odeslat soubor prostřednictvím chatu s jazykem C Sharp

String afilnet_class="chat";
String afilnet_method="sendmessage";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="3460000000";
String afilnet_message="test+message";
	
// 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, "{\"platform\":\""+afilnet_platform+"\",\"platformid\":\""+afilnet_platformid+"\",\"destination\":\""+afilnet_destination+"\",\"message\":\""+afilnet_message+"\"}");String afilnet_class="chat";
String afilnet_method="sendfile";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="3460000000";
String afilnet_type="image";
String afilnet_fileurl="https://www.example.com/image.jpg";
String afilnet_thumburl="https://www.example.com/thumb.jpg";
String afilnet_message="test+message";

// 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+"&platform="+afilnet_platform+"&platformid="+afilnet_platformid+"&destination="+afilnet_destination+"&type="+afilnet_type+"&fileurl="+afilnet_fileurl+"&thumburl="+afilnet_thumburl+"&message="+afilnet_message);
	
// 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"] = "chat";
data["method"] = "sendfile";
data["user"] = "user";
data["password"] = "password";
data["platform"] = "whatsapp";
data["platformid"] = "100";
data["destination"] = "3460000000";
data["type"] = "image";
data["fileurl"] = "https://www.example.com/image.jpg";
data["thumburl"] = "https://www.example.com/thumb.jpg";
data["message"] = "test+message";

// 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"] = "chat";
data["method"] = "sendfile";
data["platform"] = "whatsapp";
data["platformid"] = "100";
data["destination"] = "3460000000";
data["type"] = "image";
data["fileurl"] = "https://www.example.com/image.jpg";
data["thumburl"] = "https://www.example.com/thumb.jpg";
data["message"] = "test+message";

// 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="chat";
String afilnet_method="sendfile";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="3460000000";
String afilnet_type="image";
String afilnet_fileurl="https://www.example.com/image.jpg";
String afilnet_thumburl="https://www.example.com/thumb.jpg";
String afilnet_message="test+message";
	
// 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, "{\"platform\":\""+afilnet_platform+"\",\"platformid\":\""+afilnet_platformid+"\",\"destination\":\""+afilnet_destination+"\",\"type\":\""+afilnet_type+"\",\"fileurl\":\""+afilnet_fileurl+"\",\"thumburl\":\""+afilnet_thumburl+"\",\"message\":\""+afilnet_message+"\"}");
Parametr Popis Povinné / Nepovinné
class=chat Požadovaná třída: Třída, na kterou je žádost podána Povinný
method=sendfile 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ý
platform Platforma, na kterou je zpráva odeslána. Možné hodnoty: 'webchat', 'whatsapp', 'telegram', 'operátor' Povinný
platformid Identifikátor platformy Povinný
destination Příjemce, kam je soubor odeslán Povinný
type Typ odesílaného souboru. Možné hodnoty: „obrázek“, „video“, „zvuk“, „hlas“, „dokument“, „kontakt“ Povinný
fileurl Adresa URL, kde se nachází soubor odeslaný chatem Povinný
thumburl Adresa URL miniatury, která je přiložena k souboru Volitelný
message Zpráva doprovázející soubor 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
CHANNEL_NOT_FOUND Uvedený kanál neexistuje
CHAT_NOT_FOUND Uvedený chat neexistuje
INCORRECT_FILETYPE Typ souboru je nesprávný, zkontrolujte možné hodnoty
INCORRECT_FILEURL Adresa URL souboru není platná
INCORRECT_THUMBURL Adresa URL miniatury je neplatná

Získejte seznam konverzací v chatu s jazykem C Sharp

String afilnet_class="chat";
String afilnet_method="sendfile";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="3460000000";
String afilnet_type="image";
String afilnet_fileurl="https://www.example.com/image.jpg";
String afilnet_thumburl="https://www.example.com/thumb.jpg";
String afilnet_message="test+message";
	
// 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, "{\"platform\":\""+afilnet_platform+"\",\"platformid\":\""+afilnet_platformid+"\",\"destination\":\""+afilnet_destination+"\",\"type\":\""+afilnet_type+"\",\"fileurl\":\""+afilnet_fileurl+"\",\"thumburl\":\""+afilnet_thumburl+"\",\"message\":\""+afilnet_message+"\"}");String afilnet_class="chat";
String afilnet_method="getchats";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";

// 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+"&platform="+afilnet_platform+"&platformid="+afilnet_platformid);
	
// 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"] = "chat";
data["method"] = "getchats";
data["user"] = "user";
data["password"] = "password";
data["platform"] = "whatsapp";
data["platformid"] = "100";

// 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"] = "chat";
data["method"] = "getchats";
data["platform"] = "whatsapp";
data["platformid"] = "100";

// 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="chat";
String afilnet_method="getchats";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
	
// 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, "{\"platform\":\""+afilnet_platform+"\",\"platformid\":\""+afilnet_platformid+"\"}");
Parametr Popis Povinné / Nepovinné
class=chat Požadovaná třída: Třída, na kterou je žádost podána Povinný
method=getchats 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ý
platform Platforma, na kterou je zpráva odeslána. Možné hodnoty: 'webchat', 'whatsapp', 'telegram', 'operátor' Povinný
platformid Identifikátor platformy Povinný
Odpovědět:
  • postavení
  • výsledek (pokud status = úspěch), zde obdržíte následující hodnoty:
    • list
      • platformid
      • platform
      • message
      • destination
      • messageid
      • sent
      • status
      • datetime
  • 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
CHANNEL_NOT_FOUND Uvedený kanál neexistuje
CHAT_NOT_FOUND Uvedený chat neexistuje

Získejte seznam zpráv z chatu s jazykem C Sharp

String afilnet_class="chat";
String afilnet_method="getchats";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
	
// 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, "{\"platform\":\""+afilnet_platform+"\",\"platformid\":\""+afilnet_platformid+"\"}");String afilnet_class="chat";
String afilnet_method="getmessages";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="34600000000";

// 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+"&platform="+afilnet_platform+"&platformid="+afilnet_platformid+"&destination="+afilnet_destination);
	
// 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"] = "chat";
data["method"] = "getmessages";
data["user"] = "user";
data["password"] = "password";
data["platform"] = "whatsapp";
data["platformid"] = "100";
data["destination"] = "34600000000";

// 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"] = "chat";
data["method"] = "getmessages";
data["platform"] = "whatsapp";
data["platformid"] = "100";
data["destination"] = "34600000000";

// 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="chat";
String afilnet_method="getmessages";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="34600000000";
	
// 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, "{\"platform\":\""+afilnet_platform+"\",\"platformid\":\""+afilnet_platformid+"\",\"destination\":\""+afilnet_destination+"\"}");
Parametr Popis Povinné / Nepovinné
class=chat Požadovaná třída: Třída, na kterou je žádost podána Povinný
method=getmessages 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ý
platform Platforma, na kterou je zpráva odeslána. Možné hodnoty: 'webchat', 'whatsapp', 'telegram', 'operátor' Povinný
platformid Identifikátor platformy Povinný
destination Příjemce, od kterého chcete zprávy dostávat Povinný
Odpovědět:
  • postavení
  • výsledek (pokud status = úspěch), zde obdržíte následující hodnoty:
    • list
      • platformid
      • platform
      • message
      • destination
      • messageid
      • sent
      • status
      • datetime
  • 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
CHANNEL_NOT_FOUND Uvedený kanál neexistuje
CHAT_NOT_FOUND Uvedený chat neexistuje

Získejte seznam nepřečtených zpráv z chatu s jazykem C Sharp

String afilnet_class="chat";
String afilnet_method="getmessages";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="34600000000";
	
// 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, "{\"platform\":\""+afilnet_platform+"\",\"platformid\":\""+afilnet_platformid+"\",\"destination\":\""+afilnet_destination+"\"}");String afilnet_class="chat";
String afilnet_method="getunreadmessages";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="34600000000";

// 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+"&platform="+afilnet_platform+"&platformid="+afilnet_platformid+"&destination="+afilnet_destination);
	
// 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"] = "chat";
data["method"] = "getunreadmessages";
data["user"] = "user";
data["password"] = "password";
data["platform"] = "whatsapp";
data["platformid"] = "100";
data["destination"] = "34600000000";

// 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"] = "chat";
data["method"] = "getunreadmessages";
data["platform"] = "whatsapp";
data["platformid"] = "100";
data["destination"] = "34600000000";

// 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="chat";
String afilnet_method="getunreadmessages";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_platform="whatsapp";
String afilnet_platformid="100";
String afilnet_destination="34600000000";
	
// 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, "{\"platform\":\""+afilnet_platform+"\",\"platformid\":\""+afilnet_platformid+"\",\"destination\":\""+afilnet_destination+"\"}");
Parametr Popis Povinné / Nepovinné
class=chat Požadovaná třída: Třída, na kterou je žádost podána Povinný
method=getunreadmessages 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ý
platform Platforma, na kterou je zpráva odeslána. Možné hodnoty: 'webchat', 'whatsapp', 'telegram', 'operátor' Povinný
platformid Identifikátor platformy Povinný
destination Příjemce, od kterého chcete zprávy dostávat Povinný
Odpovědět:
  • postavení
  • výsledek (pokud status = úspěch), zde obdržíte následující hodnoty:
    • list
      • platformid
      • platform
      • message
      • destination
      • messageid
      • issent
      • status
      • datetime
  • 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
CHANNEL_NOT_FOUND Uvedený kanál neexistuje
CHAT_NOT_FOUND Uvedený chat neexistuje

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 Chaty 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