Download the PHP package afilnet/afilnet-api without Composer
On this page you can find all versions of the php package afilnet/afilnet-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package afilnet-api
SMS, Email and Voice notifications
Easy to use
This library is designed to be an easy way to use Afilnet API services. You can send SMS, email and voice notifications using your Afilnet account. This package can be installed with composer using "composer require afilnet/afilnet-api".
You only need an Afilnet account with enought credits. If you do not have an account, you can create an account in our website in a few minutes.
Index
- About Afilnet
- Our website
- Setup
- API Services
- SMS
- Voice
- Response
Afilnet
Afilnet is a company dedicated to Cloud Marketing.
With this module we seek to facilitate the use of the services we offer through our API.
We offer support to our clients if they have some trouble with their accounts or our services.
If you notice some error or bugs, feel free to contact us.
Website
We are available in 3 different languages:
back to top
Setup
ATTENTION: You need an Afilnet account with credits to use this module
If you dont have an account, visit our web page and create it.
After that, you will have to buy some credits to be able to send the notifications
We have a promo to test the services which give you 10 credits for free
Once you have an account, we are ready to setup the module in your app:
The first step is install the module, you can install it using composer or manual installation Composer: "composer require afilnet/afilnet-api". Then create the object:
Then login with your account (If you dont login successfully, all services will return error bad username or password).
And now we are ready to use the services :)
back to top
Afilnet API Services
There are 3 channels availables:
- Send SMS
- Send Email
- Send Voice
This library use the structure:
The three channels have the same services:
- send (Send to a single user)
- sendFromTemplate (Send to a single user using a template)
- sendToGroup (Send to a defined group)
- sendToGroupFromTemplate (Send to a defined group using a template)
- getDeliveryStatus (Get delivery status of a message)
SMS
If you want to use SMS you only need to call the object sms and the service required.
Services
Example
back to top
If you want to use Email you only need to call the object sms and the service required.
Services
Example
back to top
Voice
If you want to use Voice you only need to call the object sms and the service required.
Services
Example
back to top
RESPONSE
All services receive similar parameters but all return same array (json decoded).
The services will return an array with the next structure:
- status
- error (if status=ERROR), here you will receive the error code
- result (if status=SUCCESS), here you will receive the following values:
- messageid
- credits
ERROR CODES
Code | Description |
---|---|
MISSING_USER | User or email not included |
MISSING_PASSWORD | Password not included |
MISSING_CLASS | Class not included |
MISSING_METHOD | Method not included |
MISSING_COMPULSORY_PARAM | Compulsory parameter not included |
INCORRECT_USER_PASSWORD | Incorrect user or password |
INCORRECT_CLASS | Incorrect class |
INCORRECT_METHOD | Incorrect method |
NO_ROUTE_AVAILABLE | There are no available paths for the indicated destination |
NO_CREDITS | Your balance is insufficient |
Example
*Example for $afilnet->sms->send:
-
If everything is ok:
- If something went bad:
back to top