Download the PHP package am-naguib/am-sender without Composer

On this page you can find all versions of the php package am-naguib/am-sender. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package am-sender

AM-Sender Laravel Package

A Laravel package for integrating with the AM-Sender API (https://am-sender.com/api) to send WhatsApp messages programmatically.

Features

Installation

Install the package via Composer:

The package will be automatically discovered by Laravel.

Configuration

Publish the configuration file:

This will create a config/am-sender.php file. Add your AM-Sender credentials to your .env file:

Usage

Using the Facade

Using Dependency Injection

API Methods

listDevices()

Retrieve all devices associated with your account.

Returns:

createDevice(string $name)

Create a new device.

Returns:

send(array $payload)

Send a message to one or more recipients.

Parameters:

Returns:

Input Validation

The package automatically validates all input data before sending requests to the API. This helps catch errors early and provides clear feedback.

Validation Rules

Device Name Validation:

Message Validation:

Phone Number Validation:

Device IDs Validation:

Optional Fields:

Validation Examples

Image Handling

The package provides comprehensive image URL validation and helpful error messages for image-related issues.

Image URL Requirements:

Common Image Issues and Solutions:

Image Error Messages:

Exception Handling

The package provides specific exception classes for different error scenarios:

Configuration Options

The config/am-sender.php file provides several configuration options:

Best Practices

Input Sanitization

The package automatically trims whitespace from all string inputs and validates data formats. However, you should still sanitize your inputs before passing them to the package.

Error Handling

Always wrap your API calls in try-catch blocks to handle both validation errors and API errors gracefully:

Phone Number Formatting

The package accepts flexible phone number formats and automatically filters out empty numbers:

Batch Processing

For large recipient lists, consider breaking them into smaller batches:

Requirements

License

This package is open-sourced software licensed under the MIT license.

Support

For support and questions about the AM-Sender API, please visit https://am-sender.com.

For package-specific issues, please create an issue in the repository.


All versions of am-sender with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^10.0|^11.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package am-naguib/am-sender contains the following files

Loading the files please wait ....