Skip to content

Getting Started

Developing against divergent Connect couldn’t be simpler with our REST API or official client libraries.

Connect is a full omnichannel communication suite. Everything you can do in PureSMS you can do here too, plus more advanced features such as templating, link shortening, inbound SMS and Client Tagging for resellers.

To get started, you’ll need to set up your Connect Workspace properly.

  1. Create a Workspace at Connect.

    Open Connect
  2. If you’re not live, make sure you’ve verified your Test Number so that you can send from “ConnectTest”.

    Please note that only UK numbers are currently supported in Test Mode.

    Where do I do this?

    Within Connect, head to “Settings” and then “Test Mode”.

  3. If you’re live (or want to go live soon), add at least one Sender name to your Workspace and the Country that you’ll be sending to.

    Where do I do this?

    Within Connect, open “Senders” and then “Create a Sender”.

    You’ll be asked for a Sender Name, Sample Content and at least 1 Country to register the Sender in.

  4. Add a new API Key to your Workspace.

    Where do I do this?

    Within Connect, open “Settings” and then “API Keys”. You can then click “Add API Key”.

  5. 🎉 Ready to go.

Choose your preferred method to send your first SMS.

Install the Divergent.Connect package from NuGet:

Terminal window
dotnet add package Divergent.Connect

Choose the setup method that works best for your application:

Program.cs
var builder = WebApplication.CreateBuilder(args);
// Add Connect client
builder.AddDivergentConnect();
var app = builder.Build();

Add your configuration to appsettings.json:

appsettings.json
{
"Divergent": {
"Connect": {
"ApiKey": "your-api-key",
"DefaultSmsSender": "YourSender"
}
}
}
// Inject IConnectSms into your service/controller (or use the manually built client)
public class MyService(IConnectSms smsClient)
{
public async Task SendWelcomeSms(string phoneNumber)
{
await smsClient.SendSmsAsync(new ConnectSmsMessage
{
To = phoneNumber, // E.164 format, e.g. "+447700900123"
Content = "Hello world, from Connect!"
});
}
}