All Downloads are FREE. Search and download functionalities are using the official Maven repository.

infobip.examples.PullInboxDeliveryReportsExample Maven / Gradle / Ivy

There is a newer version: 5.1.0
Show newest version
package infobip.examples;

import infobip.api.client.GetReceivedSmsLogs;
import infobip.api.config.BasicAuthConfiguration;
import infobip.api.model.sms.mo.logs.MOLog;
import infobip.api.model.sms.mo.logs.MOLogsResponse;

public class PullInboxDeliveryReportsExample extends Example {

    public static void main(String[] args) {

        GetReceivedSmsLogs client = new GetReceivedSmsLogs(new BasicAuthConfiguration(USERNAME, PASSWORD));

        MOLogsResponse response = client.execute(null, null, null, 10, null);

        for (MOLog result : response.getResults()) {
            System.out.println("Message ID: " + result.getMessageId());
            System.out.println("Received at: " + result.getReceivedAt());
            System.out.println("Sender: " + result.getFrom());
            System.out.println("Receiver: " + result.getTo());
            System.out.println("Message text: " + result.getText());
            System.out.println("Keyword: " + result.getKeyword());
            System.out.println("Clean text: " + result.getCleanText());
            System.out.println("Sms Count: " + result.getSmsCount());
            System.out.println("------------------------------------------------");
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy