Vorlagen holen mit Android
Die Liste der Vorlagen erhalten mit Android
Android : METHODE
SMS
- SMS versenden mit Android
- SMS aus Vorlage versenden mit Android
- EMassen-SMS versenden mit Android
- Massen-SMS aus Vorlage versenden mit Android
- SMS-Zustellstatus abfragen mit Android
SPRACHNACHRICHTEN
- Sprachnachricht senden mit Android
- Stimme aus Vorlage versenden mit Android
- Massen-Stimme versenden mit Android
- Massen-Stimme aus Vorlage versenden mit Android
- Sprachausgabestatus abfragen mit Android
- E-Mail versenden mit Android
- E-Mail aus Vorlage versenden mit Android
- Massen-E-Mail versenden mit Android
- Massen-E-Mail aus Vorlage versenden mit Android
- E-Mail-Zustellstatus abfragen mit Android
SOZIALE NETZWERKE
GRUPPE
- Gruppe anlegen mit Android
- Felder aus einer Gruppe abrufen mit Android
- Feld zu einer Gruppe hinzufügen mit Android
- Feld aus einer Gruppe entfernen mit Android
- Einen Kontakt aus einer Gruppe löschen
- Land einer Gruppe zuordnen mit Android
- Kontakte der Gruppe abrufen mit Android
- Kontakt zur Gruppe hinzufügen mit Android
- Kontakt der Gruppe ändern mit Android
- Kontakt aus der Gruppe entfernen mit Android
HLR
PAÍSES
VERANSTALTUNGEN
- Ereignis zur Gruppe hinzufügen mit Android
- Ereignisse der Gruppe abrufen mit Android
- Ereignis aus einer Gruppe löschen mit Android
USER
SCHABLONEN
OTP (ONE-TIME PASSWORD)
String afilnet_class="template";
String afilnet_method="gettemplates";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_type="mobile";
String afilnet_start="0";
// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&type="+afilnet_type+"&start="+afilnet_start;
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="template";
String afilnet_method="gettemplates";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_type="mobile";
String afilnet_start="0";
// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&type="+afilnet_type+"&start="+afilnet_start;
// 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="template";
String afilnet_method="gettemplates";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_type="mobile";
String afilnet_start="0";
// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&type="+afilnet_type+"&start="+afilnet_start;
// 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());
}
Sie die Auflistung Schablonen zurücktragen
Parameter | Beschreibung | Zwigend / optional |
---|---|---|
class=template | Sorte deren Antragen sich realisiert | Zwigend |
method=gettemplates | Sortenmethode deren Antragen sich realisiert | Zwigend |
user | Der User / Email Ihres Afilnet Account | Zwigend |
password | Das password Ihres Afilnet Account | Zwigend |
type | Nachrichttyp (Mögliche Valeurs: mobile oder Email) | Optional |
start | Die Ergebnisse werden von 50 an 50 zurücktragen, Sie müssen der offset hier angeben | Optional |
Aus Sie die Anfragen verwenden,werden Sie die nächster Datenfeld bekommen:
- status
- result (si status=success), Sie werden die nächsten Codes bekommen:
- Sie werden kein Grenzkosten bekommen
- Fehler (si status=Fehler), hier werden Sie der Fehlercode bekommen
Die mögliche Fehlercode sind die nächster:
Code | Beschreibung |
---|---|
MISSING_USER | User / email nicht beiliegend |
MISSING_PASSWORD | Password nicht beiliegend |
MISSING_CLASS | Sorten nicht beiliegend |
MISSING_METHOD | Methode nicht beiliegend |
MISSING_COMPULSORY_PARAM | Parameterversicherung nicht beiliegend |
INCORRECT_USER_PASSWORD | User oder Passwort inkorrekt |
INCORRECT_CLASS | Inkorrekt Sorte |
INCORRECT_METHOD | Inkorrekt Methode |
Parameter:
- class: template
- method: gettemplates
- user: user
- password: password
- type: mobile
- start: 0
Anforderung:
https://www.afilnet.com/api/http/?class=template&method=gettemplates&user=user&password=password&type=mobile&start=0