Download the PHP package dreamsms/laravel-dreamsms without Composer

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

logo Screenshot 2025-06-24 165013

Laravel DreamSMS Package Documentation

Comprehensive reference for every method provided by the dreamsms/laravel-dreamsms package.


1. Installation & Configuration

1.1 Install via Composer

1.2 Publish Configuration

1.3 Environment Variables

Add these to your .env:

1.4 Config File (config/dreamsms.php)

How To Get Sender Name, Account Username, client_secret, and client_id

1. Account Username

Your Account Username is the username you use to log in to your Dreams account.

2. client_id

To obtain your client_id:

3. client_secret

To retrieve your client_secret:

4. Sender Name

To get your default Sender Name:


2. Service Usage

Use the Facade or inject the DreamSms service.


3. API Methods Reference

Each section details endpoint, parameters, expected response, and Laravel usage.


3.1 register(array $user): array

Description: Register a new DreamSMS user account.

HTTP Method Endpoint
POST /Register

Parameters

Name Type Required Description
user string yes Desired username
password string yes Password (min 6 chars)
name string yes Full name
mobile string yes Mobile number (e.g. 9665...)
email string yes Valid e‑mail address

Example Request

Success Response

Error Codes


3.2 generateToken(): array

Description: Obtain OAuth2 Bearer token.

HTTP Method Endpoint
POST /token/generate

Parameters

Name Type Required Description
grant_type string yes Must be client_credentials
client_id string yes OAuth client ID
client_secret string yes OAuth client secret

Example Request

Success Response

Error Responses


3.3 activate(string $user, string $code): array

Description: Activate a newly registered account.

HTTP Method Endpoint
POST /activate

Parameters

Name Type Required Description
user string yes Username
secret_key string yes API secret key
code string yes Activation code

Example Request

Response Codes


3.4 checkUser(): array

Description: Verify account credentials and activation status.

HTTP Method Endpoint
POST /chk_user

Parameters

Name Type Required Description
user string yes Username
secret_key string yes API key

Success Response

Error Codes


3.5 balance(): array

Description: Retrieve SMS credit balance.

HTTP Method Endpoint
POST /chk_balance

Parameters

Name Type Required Description
user string yes Username
secret_key string yes API key

Success Response

Error Codes


3.6 addSender(string $sender): array

Description: Create a new sender name.

HTTP Method Endpoint
POST /newsender

Parameters

Name Type Required Description
user string yes Username
secret_key string yes API key

Error Codes


3.7 senderStatus(string $sender): array

Description: Check activation status of a sender.

HTTP Method Endpoint
POST /senderstatus

Parameters

Name Type Required Description
user string yes Username
secret_key string yes API key

Status Values


3.8 userSenders(): array

Description: List all senders for your account.

HTTP Method Endpoint
POST /usersender

Success Response (XML)


3.9 sendSms(string $to, string $message, string $sender, array $options = []): array

Description: Send a single SMS, optionally with calendar reminder.

HTTP Method Endpoint
POST /sendsms

Required Parameters

Name Type Description
user string Username
secret_key string API key
to string Recipient mobile number
message string Message body

Optional Calendar Fields (is_calander = 1)

Name Description
calander_date YYYY-MM-DD
calander_time HH\:MM
reminder Minutes before event
reminder_text Reminder message
location_url Google Maps URL

Example Usage

Response


3.10 sendMulti(array $toWithMsg, string $sender): array

Description: Send different messages to multiple recipients in one request.

HTTP Method Endpoint
POST /sendsms_multi

Parameters

Name Type Description
user string Username
secret_key string API key
to string JSON: {"9665...":"Msg1","9665...":"Msg2"}

Example Usage

Response

Same format as single sendSms response.


4. Error Handling

Catch DreamSms\LaravelDreamSms\Exceptions\DreamSmsException to manage HTTP or API errors:


6. Contributions

  1. Fork and clone
  2. Create a branch feature/your-feature
  3. Write tests & code
  4. Submit a PR

Please follow PSR-12 and include tests for new methods.


7. License

MIT. See LICENSE.


All versions of laravel-dreamsms with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0|^8.1|^8.2|^8.3|^8.4
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.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 dreamsms/laravel-dreamsms contains the following files

Loading the files please wait ....