nycorp/shortext-php

This is my package shortext-php

1.0 2025-04-03 08:12 UTC

This package is auto-updated.

Last update: 2025-04-27 17:56:07 UTC


README

Latest Version on Packagist Total Downloads

Shortext – Automate your WhatsApp conversations easily πŸš€

Shortext is a smart solution that helps you automate and streamline your customer interactions through WhatsApp Business. Whether it's answering clients, managing support tickets, or sending automated notifications, Shortext puts the power of AI at the service of your customer experience.

With Shortext, you can:
βœ… Build a WhatsApp chatbot in just a few clicks
βœ… Send automated messages via WhatsApp Business
βœ… Integrate the WhatsApp API seamlessly
βœ… Improve customer satisfaction with fast, personalized responses

Discover how Shortext can transform your WhatsApp management:
πŸ‘‰ https://shortext.ny-corp.io

Powered by Shortext – Smart automation for WhatsApp Business.

Installation

You can install the package via composer:

composer require nycorp/shortext-php

Usage

Send message:

$sdk =  new ShortextClient(env('SHORTEXT_API_KEY'));
$builder = new MessageBuilder($phone, from: "<PHONE_ID>", lastname: $lastname);
$sdk->sendMessage($builder);

You can send text message with:

$builder->text("hello this is text message");

You can send media message with:

$builder->media("<YOUR FILE URL>", "document", "document.pdf", "Optional caption");
$builder->media("<YOUR FILE URL>", "audio");
$builder->media("<YOUR FILE URL>", "image", caption: "Optional caption");
$builder->media("<YOUR FILE URL>", "video", caption: "Optional caption");

You can send cta_url message with:

$builder->ctaUrl(
    bodyText: "Hello this is body text",
    url: 'https://shortext.ny-corp.io',
    urlCaption: 'Voire les dΓ©tails'
);

You can send payment message with:

$builder->payment(
    desription: "The message to display with 200 characters max length",
    amount: 100,
    currency: "XAF",
    order_id: "<OPTIONAL ORDER ID>",
    callback_url: "<YOUR OPTIONAL CALLBACK URL>"
);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.