Massen-Stimme versenden mit Android
Senden Sie eine Sprachnachricht an eine Gruppe von Telefonen oder Handys 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="voice";
String afilnet_method="sendvoicetogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_from="34900000000";
String afilnet_countrycode="34";
String afilnet_idgroup="1";
String afilnet_message="sms+test";
String afilnet_scheduledatetime="";
String afilnet_output="";
// Create an URL request
String sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&from="+afilnet_from+"&countrycode="+afilnet_countrycode+"&idgroup="+afilnet_idgroup+"&message="+afilnet_message+"&scheduledatetime="+afilnet_scheduledatetime+"&output="+afilnet_output;
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="voice";
String afilnet_method="sendvoicetogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_from="34900000000";
String afilnet_countrycode="34";
String afilnet_idgroup="1";
String afilnet_message="sms+test";
String afilnet_scheduledatetime="";
String afilnet_output="";
// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&from="+afilnet_from+"&countrycode="+afilnet_countrycode+"&idgroup="+afilnet_idgroup+"&message="+afilnet_message+"&scheduledatetime="+afilnet_scheduledatetime+"&output="+afilnet_output;
// 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="voice";
String afilnet_method="sendvoicetogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_from="34900000000";
String afilnet_countrycode="34";
String afilnet_idgroup="1";
String afilnet_message="sms+test";
String afilnet_scheduledatetime="";
String afilnet_output="";
// Create the POST request
String post = "class="+afilnet_class+"&method="+afilnet_method+"&from="+afilnet_from+"&countrycode="+afilnet_countrycode+"&idgroup="+afilnet_idgroup+"&message="+afilnet_message+"&scheduledatetime="+afilnet_scheduledatetime+"&output="+afilnet_output;
// 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());
}
Versenden Sie einen Sprachnachricht aus einem Empfänger-Gruppe
Parameter | Beschreibung | Zwigend / optional |
---|---|---|
class=voice | Sorte deren Antragen sich realisiert | Zwigend |
method=sendvoicetogroup | Sortenmethode deren Antragen sich realisiert | Zwigend |
user | Der User / Email Ihres Afilnet Account | Zwigend |
password | Das password Ihres Afilnet Account | Zwigend |
from | voice.sendvoicetogroup_from | Zwigend |
countrycode | voice.sendvoicetogroup_countrycode | Zwigend |
idgroup | voice.sendvoicetogroup_idgroup | Zwigend |
message | voice.sendvoicetogroup_message | Zwigend |
scheduledatetime | voice.sendvoicetogroup_scheduledatetime | Optional |
output | Ergebnisse Ausgabeformat | 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:
- id
- count
- credits
- destinations
- messageid
- destination
- 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 |
NOT_ACCESS_TO_GROUP | Sie verfügt nicht auf die Erlaubnis für die geeignet Gruppe |
NO_CREDITS | Sie verfügt nicht auf genug Betriebsergebnis |
Parameter:
- class: voice
- method: sendvoicetogroup
- user: user
- password: password
- from: 34900000000
- countrycode: 34
- idgroup: 1
- message: sms+test
- scheduledatetime:
- output:
Anforderung:
https://www.afilnet.com/api/http/?class=voice&method=sendvoicetogroup&user=user&password=password&from=34900000000&countrycode=34&idgroup=1&message=sms+test&scheduledatetime=&output=