You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Orange SMS Africa and Middle East API requires an Access token, based on your developer credentials (client id and client secret).
SMSsms = newSMS("XXXXXXXXXXX", "XXXXXXXXXXXXX");
You can now retrieve the token.
sms.generateAccessToken(); // get token
Note: This token expire after one hour
Balance
To retrieve the number of remaining sms and the validity:
BalanceResponsebalance = sms.getRemainingBalance(Country.GUINEA); balance.getAvailableUnits(); // Number of remaining sms balance.getExpirationDate(); // Expiration date
You will need to specify for which country you would like to retrieve this information.
You can easily send an SMS by doing the following:
SMSRequestsmsRequest = SMSRequest.builder() .from(Country.GUINEA) // Specify the country .to("2246XXXXXXXX") // The recipient's number .senderName("SPECIFIC_SENDER_NAME") // (Optional) You can specify the SMS header .message("As salamou aleykoum") // The message to send .build();
// You can now send your SMS SendSMSResponsesmsResponse = sms.send(smsRequest);
To find out if the operation was successful, you must retrieve the unique identifier of this SMS. If there is then the SMS has been sent successfully
smsResponse.getSMSId();
Purschase History
You can find the history of all your pack purchases from your account