- Account & API Key
- Install from Nuget console manager
- Download sources
- Authentication
- Buy credits
- Send E-mail
- Send SMS
- Webhooks
Generate your E-mail Tokens (be logged in first)
Generate your SMS API Key (be logged in first)
Install from Nuget console manager
Install-Package Sarbacane-Sdk
git clone https://github.com/sarbacane-sdk/csharp.git .
AuthenticationManager.setEmailTokens('MY_EMAIL_USERNAME', 'MY_EMAIL_APIKEY');
AuthenticationManager.setSmsApikey('MY_SMS_APIKEY');
SBEmailMessage email = new SBEmailMessage();
email.setMailFrom("sender@domain.com");
email.setMailFromName("Sender Name");
email.setSubject("Message sent by Sarbacane SDK C#");
email.setHtmlBody("Here is the <b>HTML</b> content of the message.");
email.setTextBody("Here is the content of the message");
ArrayList recipientsList = new ArrayList();
recipientsList.Add("address1@domain.com");
recipientsList.Add("address2@domain.com");
email.setRecipients(recipientsList);
MessagesManager.sendEmailMessage(email);
SBSmsMessage msg = new SBSmsMessage();
msg.setType("notification");
msg.setNumber("+33600000000");
msg.setMessage("Confirmation code is: 283951");
msg.setSender("SBSMS");
msg.setCategory("confirmationCode");
msg.setCampaignName("Authentication confirmation code");
MessagesManager.sendSmsMessage(msg);