Transports

Taqnyat

Send email, SMS, and WhatsApp through Taqnyat — one provider, three channel transports.

Taqnyat is a multi-channel provider. Wire each product into its sently channel sender — do not build a mega Taqnyat client.

The one rule

Use createMailer, createSmsSender, or createWhatsAppSender with the matching sently/transports/taqnyat-* transport. Vendor extras stay on the concrete transport instance — never on the shared channel sender.

ChannelTransportImport
SMSTaqnyatSmsTransportsently/transports/taqnyat-sms
WhatsAppTaqnyatWhatsAppTransportsently/transports/taqnyat-whatsapp
EmailTaqnyatMailTransportsently/transports/taqnyat-mail

SMS

OptionTypeDefault or requirement
bearerTokenstringrequired
senderstringrequired — active portal sender name (case-sensitive)

Recipients are normalized to international digits (no + / leading 00).

Setup

import { createSmsSender } from "sently/sms";
import { TaqnyatSmsTransport } from "sently/transports/taqnyat-sms";

const taqnyat = new TaqnyatSmsTransport({
  bearerToken: process.env.TAQNYAT_TOKEN!,
  sender: "Taqnyat.sa",
});
const sms = createSmsSender({ transport: taqnyat });

Features

Pick a branch. Channel send goes through sms; everything else is called on taqnyat.

Immediate SMS via the channel sender.

const result = await sms.send({
  to: "+9665xxxxxxxx",
  body: "Hello from sently",
});
console.log(result.messageId, result.response);

Optional from overrides the transport sender for that send.

WhatsApp

OptionTypeDefault or requirement
bearerTokenstringrequired

Business-initiated chats must start with an approved template. Session text is only allowed after the user replies (24h window). Queued accepts may return statuses: "PENDING" with no message_id yet — still treated as accepted.

Setup

import { createWhatsAppSender } from "sently/whatsapp";
import { TaqnyatWhatsAppTransport } from "sently/transports/taqnyat-whatsapp";

const transport = new TaqnyatWhatsAppTransport({
  bearerToken: process.env.TAQNYAT_WHATSAPP_TOKEN!,
});
const wa = createWhatsAppSender({ transport });

Features

Pick a branch. Template/session send goes through wa; extras stay on transport.

Business-initiated message with an approved template.

await transport.optIn("+9665xxxxxxxx"); // once per recipient when required

const result = await wa.send({
  to: "+9665xxxxxxxx",
  template: {
    name: "demotest1_testr11",
    language: "ar",
    // components: [...] // when the template has variables
  },
});
console.log(result.messageId, result.response);

Sandbox: recipient must be on the authorized numbers list.

Email

OptionTypeDefault or requirement
bearerTokenstringrequired
campaignNamestringrequired

from should be a sender address your Taqnyat account is allowed to use. See Sender Approval if email is not enabled in the portal yet.

Features

Transactional email via the channel mailer.

import { createMailer } from "sently/mailer";
import { TaqnyatMailTransport } from "sently/transports/taqnyat-mail";

const mailer = await createMailer({
  transport: new TaqnyatMailTransport({
    bearerToken: process.env.TAQNYAT_MAIL_TOKEN!,
    campaignName: "sently",
  }),
});

await mailer.send({
  from: "noreply@example.com",
  to: "person@example.com",
  subject: "Hello",
  text: "Hi",
  // html: "<p>Hi</p>",
});

Body is html when set, otherwise text (msg on Taqnyat’s API).

Account verification & sender names

Portal onboarding from Taqnyat — required before a custom SMS sender is active. Not part of the sently API; complete these in the Taqnyat portal.

Account verification

  1. Fill out the contract, sign it, and stamp it.
  2. If the organization is subject to tax, attach the tax certificate.

New sender name

RuleDetail
AuthorizationFill out the sender-name authorization form, sign it, and stamp it
Name relationSender name must relate to the organization; otherwise attach a supporting document that explains the link
FeeSAR 230, renewed annually
Service nameMax 11 characters
Promotional nameMax 8 characters, with -AD appended at the end
Dual registrationNames ≤ 8 characters can be registered as both service and promotional for one SAR 230 fee (counts as one name)

Tip

Use the Senders tab above (listSenders) after registration to confirm the name is active before hard-coding sender.

Troubleshooting

Contact & resources

Provider contact details from Taqnyat (account setup, packages, and platform guides).

ContactDetail
Unified number920015404
Support emailsupport@taqnyat.sa
Point of contacta.ghaith@taqnyat.sa
Packages & pricingOffers & packages
Platform explanationsTechnical explanations

API reference: SMS, WhatsApp, Verify, Mail.

Learn more

Next

On this page