Download the PHP package vonage/php-skeleton-app without Composer

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

Vonage PHP Skeleton Application

This is a basic Slim 4 PHP application to test and debug your Vonage credentials and environment. Utilize this application to test that your API credentials are in working order and to examine the event webhook data you receive when API requests are received by Vonage from your account.

Requirements

This application requires that you have the following installed locally:

Additionally, in order to test your Vonage account, you must have a Vonage account. You can create a Vonage account for free or manage your Vonage account details at the Vonage Dashboard.

This application is meant to be run as a standalone test, but it can also be used with a web server like Apache or nginx.

Installation and Usage

You can run this application by first cloning this repository locally:

Alternatively, you could clone this repository through git

Once you have downloaded a local copy, change into the directory of the application in your terminal and install the dependencies:

You can now set up the application for your Vonage account.

Configure the Application

In order to test your API credentials, rename the provided .env.example file to .env and supply the values for the following environment variable keys:

The VONAGE_API_KEY and VONAGE_API_SECRET can be found in your account dashboard.

As always, make sure to not commit your sensitive API credential data to any public version control (don't worry, the .env file is in .gitignore already).

Run the Application

Once you have your API credentials ready, you can go ahead and use this skeleton app. To start the application's server, run the following from the command line inside the directory of the app:

Visit http://localhost:8080 in your browser and you should see the form ready to send.

Send an SMS to Test Your Setup

You can test that your credentials work by going to http://localhost:8000/ in your browser and filling out the form there. You will need to supply:

  1. A number to send the SMS to, such as your personal mobile phone
  2. A number you wish the test SMS message to originate from. For example, this could be your Vonage provisioned virtual phone number
  3. A message to send

Fill in the field and choose "Send SMS" ... then check your cellphone!

Handling Event Webhooks

In order to test the incoming webhook data from Vonage, the Vonage API needs an externally accessible URL to send that data to. A commonly used service for development and testing is ngrok. This service will provide you with an externally available web address that creates a secure tunnel to your local environment. The Vonage Developer Platform has a guide to getting started with testing with ngrok but here's the short version:

When the tunnel is created, copy the Forwarding URL (it will look something like https://abcd1234.ngrok.io); this is the public URL for your local application. You can use it to direct webhooks from Vonage's servers to your local application.

Once you have your ngrok URL, you can enter your Vonage Dashboard and supply it as the EVENT URL for any Vonage service that sends event data via a webhook. A good test case is creating a Voice application and providing the ngrok URL in the following format as the event url:

#{ngrok URL}/webhooks/event

You can then call your Vonage Voice application, and with your skeleton application running you can observe the webhook data be received in real time for diagnosis of any issues and testing of your Vonage account.

The skeleton app is also capable of receiving Vonage API webhook data. As mentioned in the Using ngrok section above, a good candidate for that test is a Vonage Voice application. From within your Vonage dashboard you can create a Vonage Voice application, provision a Vonage virtual phone number and then link that number to your Voice application. Once you have ensured that your new Voice application's EVENT URL is #{ngrok URL}/webhooks/event, you can then give your Vonage number a phone call. You should see the webhook data in your console in real time. For example, data for a ringing phone call will look like this:

You can exit your application at anytime by holding down the CTRL and C keys on your keyboard.

Contributing

We ❤️ contributions from everyone! Bug reports, bug fixes and feedback on the application is always appreciated. Look at the Contributor Guidelines for more information and please follow the GitHub Flow.

License

This projet is under the MIT License


All versions of php-skeleton-app with dependencies

PHP Build Version
Package Version
Requires slim/slim Version 4.*
slim/psr7 Version ^0.6.0
vlucas/phpdotenv Version ^4.1
slim/twig-view Version ^3.0
php-di/php-di Version ^6.0
vonage/client Version ^2.3
slim/flash Version ^0.4.0
kanellov/slim-twig-flash Version ^0.2.0
twig/extensions Version ^1.5.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 vonage/php-skeleton-app contains the following files

Loading the files please wait ....