Installing the SDK
Initialize the Client
import { Contiguity } from "contiguity";
const contiguity = new Contiguity("contiguity_sk_...your_token...");
Sending a message
Contiguity expects the recipient phone number to be formatted in E.164. You can attempt to pass numbers in formats like NANP, and the SDKs will try their best to convert it.
const res = await contiguity.text.send({
to: "+1234567890",
message: "Hello from Contiguity!",
// from: "+15555555555" // if you lease a number from Contiguity, you can provide it here
});
Response
Unique identifier for the sent text message, used for tracking and delivery status.
Request metadata including ID, timestamp, and API version.
Parameters
text.send(params)
The recipient’s phone number in E.164 format (e.g., “+1234567890”).
The text message content to send to the recipient.
Optionally, if you lease a number from Contiguity, you can provide it here to send from.
Installing the SDK
Initialize the Client
import contiguity
client = contiguity.login("your_token_here")
You can also initialize it with the optional ‘debug’ flag:client = contiguity.login("your_token_here", True)
Sending a message
Contiguity expects the recipient phone number to be formatted in E.164. You can attempt to pass numbers in formats like NANP, and the SDKs will try their best to convert it.
text_object = {
"to": "+15555555555",
"message": "I sent this text using Contiguity"
}
client.send.text(text_object)
Parameters
text.send(params)
The recipient’s phone number in E.164 format (e.g., “+15555555555”).
The text message content to send to the recipient.
Optionally, if you lease a number from Contiguity, you can provide it here to send from.