Skip to content

🚀 Feature: Add ValueFirst (vfirst.com) as a native SMS provider #10919

Description

@Lokendra-egov

🔖 Feature description

Add ValueFirst (https://www.vfirst.com) as a native SMS provider under packages/providers/src/lib/sms/valuefirst/, following the same pattern as existing providers such as termii and firetext.

ValueFirst exposes an XML-based HTTPS API for sending SMS. The provider requires Bearer token authentication (7-day TTL, auto-refreshed) and supports delivery report (DLR) webhooks via HTTP callback.

Credentials needed

  • username — ValueFirst account username
  • password — ValueFirst account password
  • from — Sender ID (max 11 alphanumeric chars)

API endpoint: https://api.myvfirst.com/psms/servlet/psms.Eservice2

DLR status values to map: DELIVERED, NOT_DELIVERED, QUEUED, SENT, FAILED, REJECTED

🎤 Why is this feature needed ?

ValueFirst is one of the most widely adopted CPaaS providers in India, used extensively across government platforms, banking, healthcare, and enterprise systems. Several Novu users building products for the Indian market are currently blocked from using ValueFirst natively and are forced to work around the limitation using the generic-sms provider with a custom HTTP adapter — adding unnecessary infrastructure overhead.

Concrete use case:
We are building a citizen-facing complaint resolution system on the
DIGIT urban governance platform (used by multiple state governments in
India). Notifications such as complaint acknowledgements, status updates,
and resolution confirmations need to be delivered via SMS using ValueFirst,
which is the mandated SMS gateway for several government tenants.

India-specific requirement — DLT compliance:
TRAI (India's telecom regulator) mandates that every commercial SMS carry
a registered DLTTEMPLATEID, DLTCONTENTTYPE, and ENTITYID. A native
ValueFirst provider would allow these fields to be passed correctly through
Novu's _passthrough mechanism, which is not straightforward with the
current generic-sms workaround.

Adding this provider would give Indian Novu users a first-class integration
with no custom adapter code required.

✌️ How do you aim to achieve this?

I want this feature to introduce a new valuefirst provider package under
packages/providers/src/lib/sms/valuefirst/ with the following structure:

Files to create:

  • valuefirst.provider.ts — core provider implementing ISmsProvider
  • valuefirst.provider.spec.ts — unit tests
  • index.ts — barrel export

Implementation plan:

  1. Authentication — POST to ValueFirst's token endpoint
    (https://api.myvfirst.com/psms/api/messages/token?action=generate)
    using Basic Auth, cache the Bearer token with a 7-day TTL, and
    auto-refresh before expiry.

  2. sendMessage() — Build a ValueFirst XML payload and POST it to
    https://api.myvfirst.com/psms/servlet/psms.Eservice2 with
    Authorization: Bearer <token>. Extract the message ID from the
    XML response.

  3. getStatus() — Map ValueFirst DLR statuses (DELIVERED,
    NOT_DELIVERED, QUEUED, SENT, FAILED, REJECTED) to
    SmsEventStatusEnum.

  4. parseEventBody() — Parse ValueFirst's DLR webhook callback
    (query-string format) into a standardised ISmsWebhookBody.

  5. Register the provider in SmsProviderIdEnum and export it
    from the SMS providers index.

I am willing to submit a PR implementing the above. The implementation
would closely follow the pattern of termii and firetext providers
already in the codebase.

🔄️ Additional Information

I tried using the existing generic-sms provider as a workaround by
pointing its baseUrl at a custom Node.js adapter that translates
Novu's JSON payload into ValueFirst's XML API format. While this works,
It requires maintaining an extra adapter service, managing the Bearer token
rotation outside of Novu, and handling DLR webhook forwarding manually.

A native provider would eliminate all of this overhead and make
ValueFirst a first-class integration available directly from the
Novu dashboard — consistent with how Twilio, Termii, and other
Providers work today.

References:

👀 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions