API جهات الاتصال

إدارة مجموعاتك (إنشاء مجموعات أو تعديلها أو حذفها) وجهات الاتصال من خلال واجهة برمجة التطبيقات الخاصة بنا لجهات الاتصال.

إنشاء مجموعة باستخدام Java

String afilnet_class="group";
String afilnet_method="creategroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_name="test name";
String afilnet_type="mobile";
String afilnet_fields="mobile,name,address";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&name="+afilnet_name+"&type="+afilnet_type+"&fields="+afilnet_fields;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="creategroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_name="test name";
String afilnet_type="mobile";
String afilnet_fields="mobile,name,address";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&name="+afilnet_name+"&type="+afilnet_type+"&fields="+afilnet_fields;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="creategroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_name="test name";
String afilnet_type="mobile";
String afilnet_fields="mobile,name,address";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&name="+afilnet_name+"&type="+afilnet_type+"&fields="+afilnet_fields;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=creategroup طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
name اسم المجموعة إلزامي
type نوع المجموعة (البريد الإلكتروني أو المحمول) إلزامي
fields قائمة الحقول مفصولة بفواصل. من الضروري تضمين حقل متنقل إذا كان type = mobile وحقل بريد إلكتروني إذا type = email إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
INCORRECT_TYPE نوع غير صحيح. يجب أن يكون النوع المحمول أو البريد الإلكتروني
MISSING_MAIN_FIELD الحقل الرئيسي مفقود (المحمول إذا كان النوع = جوال أو بريد إلكتروني إذا كان النوع = بريد إلكتروني)

الحصول على حقل مجموعة بها Java

String afilnet_class="group";
String afilnet_method="creategroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_name="test name";
String afilnet_type="mobile";
String afilnet_fields="mobile,name,address";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&name="+afilnet_name+"&type="+afilnet_type+"&fields="+afilnet_fields;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="getgroupcolumns";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="getgroupcolumns";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="getgroupcolumns";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=getgroupcolumns طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها

إضافة حقل إلى مجموعة بها Java

String afilnet_class="group";
String afilnet_method="getgroupcolumns";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="addcolumntogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_field="name";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&field="+afilnet_field;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="addcolumntogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_field="name";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&field="+afilnet_field;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="addcolumntogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_field="name";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&field="+afilnet_field;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=addcolumntogroup طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
field مجال المجموعة إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها

حذف الحقل من مجموعة بها Java

String afilnet_class="group";
String afilnet_method="addcolumntogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_field="name";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&field="+afilnet_field;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="deletecolumnfromgroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_field="name";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&field="+afilnet_field;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="deletecolumnfromgroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_field="name";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&field="+afilnet_field;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="deletecolumnfromgroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_field="name";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&field="+afilnet_field;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=deletecolumnfromgroup طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
field مجال المجموعة إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها

حذف جهة اتصال من مجموعة بها Java

String afilnet_class="group";
String afilnet_method="deletecolumnfromgroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_field="name";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&field="+afilnet_field;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="deletegroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="deletegroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="deletegroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=deletegroup طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها

عيّن البلد إلى مجموعة بها Java

String afilnet_class="group";
String afilnet_method="deletegroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="assigncountrytogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_countryiso3="esp";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&countryiso3="+afilnet_countryiso3;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="assigncountrytogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_countryiso3="esp";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&countryiso3="+afilnet_countryiso3;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="assigncountrytogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_countryiso3="esp";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&countryiso3="+afilnet_countryiso3;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=assigncountrytogroup طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
countryiso3 رمز ISO البلد إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها
COUNTRY_NOT_FOUND لا توجد دولة مع الرمز المشار إليه

الحصول على جهات اتصال جماعية باستخدام Java

String afilnet_class="group";
String afilnet_method="assigncountrytogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_countryiso3="esp";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&countryiso3="+afilnet_countryiso3;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="getcontacts";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="getcontacts";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="getcontacts";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=getcontacts طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها

الحصول على جهة اتصال من مجموعة مع Java

String afilnet_class="group";
String afilnet_method="getcontacts";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="getcontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="getcontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="getcontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=getcontact طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
idcontact معرف جهة الاتصال إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها
NOT_ACCESS_TO_CONTACT ERROR_NOT_ACCESS_TO_CONTACT

إضافة جهة اتصال إلى مجموعة بها Java

String afilnet_class="group";
String afilnet_method="getcontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="addcontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_contact="mobile:123456789,name:testname";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&contact="+afilnet_contact;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="addcontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_contact="mobile:123456789,name:testname";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&contact="+afilnet_contact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="addcontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_contact="mobile:123456789,name:testname";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&contact="+afilnet_contact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=addcontact طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
contact اتصل لإضافتها مع حقولها مفصولة بفواصل ، انظر المثال إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
CONTACT_EXISTS جهة الاتصال موجودة بالفعل في المجموعة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها

إضافة قائمة جهات اتصال إلى مجموعة باستخدام اللغة Java

String afilnet_class="group";
String afilnet_method="addcontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_contact="mobile:123456789,name:testname";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&contact="+afilnet_contact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="addcontactlist";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_contacts="[{"name":"Test","mobile":"34600000000"},{"name":"Test","mobile":"34600000001"}]";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&contacts="+afilnet_contacts;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="addcontactlist";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_contacts="[{"name":"Test","mobile":"34600000000"},{"name":"Test","mobile":"34600000001"}]";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&contacts="+afilnet_contacts;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="addcontactlist";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_contacts="[{"name":"Test","mobile":"34600000000"},{"name":"Test","mobile":"34600000001"}]";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&contacts="+afilnet_contacts;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=addcontactlist طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
contacts قائمة جهات الاتصال بتنسيق JSON إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها

تعديل جهة اتصال مجموعة بها Java

String afilnet_class="group";
String afilnet_method="addcontactlist";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_contacts="[{"name":"Test","mobile":"34600000000"},{"name":"Test","mobile":"34600000001"}]";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&contacts="+afilnet_contacts;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="modifycontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";
String afilnet_contact="mobile:123456789,name:testname";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact+"&contact="+afilnet_contact;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="modifycontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";
String afilnet_contact="mobile:123456789,name:testname";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact+"&contact="+afilnet_contact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="modifycontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";
String afilnet_contact="mobile:123456789,name:testname";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact+"&contact="+afilnet_contact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=modifycontact طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
idcontact معرف الاتصال إلزامي
contact اتصل لإضافتها مع حقولها مفصولة بفواصل ، انظر المثال إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها

حذف جهة اتصال من مجموعة بها Java

String afilnet_class="group";
String afilnet_method="modifycontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";
String afilnet_contact="mobile:123456789,name:testname";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact+"&contact="+afilnet_contact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}String afilnet_class="group";
String afilnet_method="deletecontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";

// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact;
	  
URL url = new URL(sUrl);
StringBuilder builder = new StringBuilder();
BufferedReader theJSONline = new BufferedReader(new InputStreamReader(url.openStream()));
builder.append(theJSONline.readLine());

String content = builder.toString();
String afilnet_class="group";
String afilnet_method="deletecontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/http/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
String afilnet_class="group";
String afilnet_method="deletecontact";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idcontact="1000";

// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup+"&idcontact="+afilnet_idcontact;
	  
// We generate the URL
URL myurl = new URL("https://www.afilnet.com/api/basic/");

// We create the connection
HttpURLConnection con = (HttpURLConnection) myurl.openConnection();
String encoded = Base64.getEncoder().encodeToString((afilnet_user+":"+afilnet_password).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", "Basic "+encoded);
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Content-Length", String.valueOf(post.length()));
con.setRequestMethod("POST");

// We build the 
OutputStream os = con.getOutputStream();
os.write(post.getBytes());
os.close();	 

StringBuilder sb = new StringBuilder();  
int HttpResult = con.getResponseCode();
if(HttpResult == HttpURLConnection.HTTP_OK)
{
	BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));  

	String line = null;
	while ((line = br.readLine()) != null) {  
		sb.append(line + "\n");  
	}

	br.close(); 
	System.out.println(""+sb.toString());  

} else { 
	System.out.println(con.getResponseCode());
	System.out.println(con.getResponseMessage());  
}
معامل وصف إجباري / اختياري
class=group الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=deletecontact طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف مجموعة إلزامي
idcontact معرف الاتصال إلزامي
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • لن يتم إرسال قيم إضافية إليك
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها

إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ PHP إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Java إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ C Sharp إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Unix إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ ruby on rails إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ python إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Android إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Objective C / iPhone إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ SQL Server إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Oracle إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Node JS إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Go إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Scala إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Swift إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Delphi

تقدم لك Afilnet طرقًا لتحسين الأمان عند استخدام واجهة برمجة التطبيقات الخاصة بنا مع {اللغة} ، وذلك بفضل إمكانية إنشاء عمليات الوصول وإمكانية تنشيط التصفية بواسطة IP.

أي واجهة برمجة تطبيقات للغة {اللغة} يجب أن أستخدمها؟

اكتشف مزايا وعيوب كل من واجهات برمجة التطبيقات الخاصة بنا. اكتشف واجهة برمجة التطبيقات الأفضل لبرنامجك في {اللغة}.

تتيح لك واجهة برمجة التطبيقات هذه الاتصال بنا من Java لإرسال الطلبات عبر طلبات HTTP GET. يرسل هذا الطلب المعلمات في نفس عنوان URL مثل الطلب.

  • HTTP GET سهل التنفيذ للغاية
  • يتم إرسال المعلومات بدون تشفير (يمكن استخراج كلمات المرور من السجلات أو ذاكرة التخزين المؤقت)
  • الحد الأقصى للطلب حوالي 4000 حرف

تسمح لك واجهة برمجة تطبيقات طلب POST بالاتصال بواجهة برمجة التطبيقات الخاصة بنا من Java عن طريق إرسال معلمات الطلب عبر معلمات HTTP POST. يتم إرسال المعلومات بشكل مستقل عن URL.

  • HTTP POST سهل التنفيذ
  • يتم إرسال المعلومات مشفرة
  • لا يوجد حد لحجم الطلب
  • أمان متوسط

تسمح واجهة برمجة تطبيقات المصادقة الأساسية باستخدام طلبات GET و POST باللغة Java مع طبقة أمان إضافية ، لأنه في هذه الحالة يتم إرسال اسم المستخدم وكلمة المرور في رأس الطلب.

  • المصادقة الأساسية سهلة التنفيذ
  • يتم إرسال بيانات الوصول مشفرة
  • يعتمد حد الحجم على استخدام GET أو POST
  • أمان متوسط

يتيح لك SOAP إرسال طلبات بتنسيق XML مع Java ، ويضيف SOAP طبقة أمان إضافية لطلبات API.

  • يعتبر تكامل SOAP أكثر تعقيدًا
  • يتم إرسال المعلومات مشفرة
  • لا يوجد حد لحجم الطلب
  • متوسطة / عالية الأمان

تتيح لك واجهة برمجة تطبيقات JSON الخاصة بنا إرسال الطلبات بتنسيق JSON مع {اللغة} ، بالإضافة إلى أن واجهة برمجة التطبيقات هذه تضيف بروتوكول oAuth 2.0 في المصادقة التي تتيح لك إضافة طبقة أمان إضافية.

  • يعتبر تكامل JSON oAuth 2.0 أكثر تعقيدًا
  • يتم إرسال المعلومات مشفرة
  • لا يوجد حد لحجم الطلب
  • حماية عالية

ربط Java بواجهة برمجة التطبيقات جهات الاتصال الخاصة بنا

01

سجل كعميل

من أجل الوصول إلى API ، يجب أن تكون عميل Afilnet. سيستغرق التسجيل بضع دقائق.

02

طلب نسخة تجريبية مجانية

ستقدم لك شركتنا رصيدًا تجريبيًا يتيح لك الاختبار باستخدام واجهة برمجة التطبيقات التي تحتاجها.

03

دمج API

قم بإجراء تكامل API باستخدام لغة البرمجة التي تختارها. إذا كان لديك أي أسئلة أو اقتراحات حول API ، فاتصل بنا

04

مرحبا بكم في Afilnet!

كل شيء جاهز! ، تمكن من تحسين اتصالاته مع Afilnet. نحن هنا لدعم API لدينا عند الحاجة إليها


تواصل مع فريقنا لطرح أي أسئلة من خلال طرق الاتصال التي نقدمها. سيحاول فريقنا أن يقدم لك حلاً فوريًا وسيساعدك في دمج API الخاص بنا في برنامجك.

جرب Afilnet مجانًا!

سجل مجانا وجرب Afilnet! نحن نقدم لك نسخة تجريبية مجانية من خدماتنا. *



(*) الترويج صالح فقط للشركات التي لم تستخدم خدمة Afilnet من قبل. عند طلب الرصيد المجاني ، قد تطلب Afilnet التحقق من معلومات شركتك


الرسائل القصيرة بالجملة · التسويق عبر البريد الإلكتروني · شبكة اجتماعية · رسالة فورية · شهادة · وأكثر بكثير
استمر معلومات مهمة حول ملفات تعريف الارتباط: إذا واصلت استخدام هذا الويب ، فسنفترض أنك تقبل شروط الاستخدام. ستجد المزيد من المعلومات في سياسة ملفات تعريف الارتباط الخاصة بنا.
طرق الدفع
تحويلة كهربية بالسلك
بطاقة إئتمان
Paypal
Western Union
Skrill
Crypto
Afilnet بلغتك

Copyright © 2023 Afilnet · كل الحقوق محفوظة