Download the PHP package devriyad/giosms without Composer

On this page you can find all versions of the php package devriyad/giosms. 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 giosms

GioSMS PHP SDK

Latest Version on Packagist PHP Version

The official PHP SDK for GioSMS — a fast, reliable SMS gateway for Bangladesh. Works with Laravel 9+ (zero config, auto-discovery) and any standalone PHP 8.1+ project.


Table of Contents


Requirements


Installation

That's it. Guzzle is pulled in automatically if you don't already have it.


Setup — Laravel

Zero config. The service provider and facade are auto-discovered. No need to edit config/app.php.

Step 1: Add credentials to .env

Variable Required Description
GIOSMS_TOKEN Yes Your API bearer token from the GioSMS dashboard
GIOSMS_SENDER_ID No Default sender ID (max 16 chars). Can be overridden per request.
GIOSMS_BASE_URL No API base URL. Default: https://api.giosms.com/api/v1
GIOSMS_TIMEOUT No Request timeout in seconds. Default: 30
GIOSMS_SSL_VERIFY No SSL certificate verification. Default: true. Set false for local dev.

Step 2 (Optional): Publish the config file

This creates config/giosms.php if you need to customize anything beyond .env variables.

Step 3: Start sending


Setup — Standalone PHP (Without Laravel)

For any PHP project that doesn't use Laravel — plain PHP, Symfony, CodeIgniter, Slim, etc.

Option A: Pass config directly

Option B: Use a .env file (recommended for production)

If you want to keep secrets out of your code, use the popular vlucas/phpdotenv package:

Create a .env file in your project root:

Then load it in your code:

Note: Add .env to your .gitignore so your API token is never committed to version control.

Constructor Parameters

Key Type Required Default Description
token string Yes Your GioSMS API bearer token
sender_id string No null Default sender ID. Can be overridden per request.
base_url string No https://api.giosms.com/api/v1 API base URL
timeout int No 30 HTTP request timeout in seconds
ssl_verify bool No true SSL certificate verification. Set false for local dev without SSL.

Usage

All examples below use the Laravel Facade syntax. For standalone PHP, replace GioSMS::method(...) with $sms->method(...) where $sms is your new GioSMS([...]) instance.

Send Single SMS

Parameters

Key Type Required Description
to string Yes Phone number with country code (e.g. 8801712345678)
message string Yes Message body. Max 1000 characters.
sender_id string No Override default sender ID. Max 16 characters.
type string No otp, transactional, or promotional. Default: transactional

Send OTP (High Priority)

OTP messages are processed in the highest priority queue for the fastest possible delivery.

The type is automatically set to otp — you don't need to specify it.

Send Bulk SMS

Send the same message to multiple phone numbers at once. Pass to as an array — the SDK handles the comma-separated conversion.

Send to Contacts

Send to contacts stored in your GioSMS account by their IDs.

Send to Groups

Send to all contacts in one or more groups. Duplicate phone numbers across groups are automatically deduplicated by the API.

Provide either message or template_id, not both.

Check Delivery Status

Status flow: queuedsubmitteddelivered or failed

Check Balance & Cost Estimate

Batch Tracking

Health Check

Check if the GioSMS API is up. This endpoint requires no authentication.


Error Handling

The SDK throws specific exceptions for each error type. All exceptions extend GioSMSException, so you can catch them broadly or specifically.

Standalone PHP — same approach:


Laravel Dependency Injection

Instead of using the Facade, you can type-hint GioSMS anywhere Laravel resolves dependencies — controllers, jobs, commands, etc.

In a queued job:


Reference

All Methods at a Glance

Method Description Returns
send(array $params) Send single SMS Message data with message_id
otp(array $params) Send OTP (high priority) Message data with message_id
bulk(array $params) Send to multiple numbers Batch data with batch_id
toContacts(array $params) Send to contact IDs Batch data with batch_id
toGroups(array $params) Send to group IDs Batch data with batch_id
status(array $params) Get delivery status Status data
balance(array $params) Check balance / estimate cost Balance and rates data
batch(array $params) Get batch report Batch stats with live progress
activeBatches() List active batches Array of active batches
batchHistory(array $params) Get batch history Array of past batches
health() API health check Status and version

SMS Types & Priority

Type Value Queue Priority Best For
OTP otp 🔴 Highest One-time passwords, verification codes
Transactional transactional 🟡 Medium Order confirmations, alerts, notifications
Promotional promotional 🟢 Low Marketing campaigns, offers, newsletters

Default type is transactional for send(), otp(), and toContacts(), and promotional for bulk() and toGroups().

Encoding & Character Limits

Encoding Single SMS Multipart (per part) Triggered By
GSM 7-bit 160 chars 153 chars Latin-only text
Unicode (UCS-2) 70 chars 67 chars Bengali, Arabic, emoji, etc.

Encoding is detected automatically by the API based on your message content. No configuration needed.

HTTP Status Codes & Exceptions

HTTP Code Exception Class Meaning
200 Success
202 Accepted — SMS queued for delivery
400 ValidationException Bad request — check your parameters
401 AuthenticationException Invalid or missing API token
402 InsufficientBalanceException Not enough balance
404 GioSMSException Resource not found (wrong message_id, batch_id, etc.)
422 ValidationException Validation error
429 RateLimitException Rate limit exceeded
500 GioSMSException Server error — try again later

License

MIT — see LICENSE for details.


Built with ❤️ by Riyad Munauwar


All versions of giosms with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
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 devriyad/giosms contains the following files

Loading the files please wait ...