/nexmo-php-code-snippets

PHP code examples for using Nexmo

Primary LanguagePHPMIT LicenseMIT

Nexmo APIs Quickstart Examples for PHP

The purpose of the quickstart guide is to provide simple PHP examples focused on one goal. For example, sending an SMS, receiving an SMS via an incoming SMS webhook or making a Text to Speech call.

Quickstarts also available for Java, .NET, Node.js, Python, Ruby

Configure with Your Nexmo API Keys

To use this sample you will first need a Nexmo account. Once you have your own API credentials, rename the .env-example file to .env and set the values as required.

For some of the examples, you will need to buy a number.

Examples

SMS

Code Sample
Send an SMS
Receive an SMS
Receive a Delivery Receipt

Voice

Code Sample
Make a Phone Call
Receive a Phone Call
Play Text-to-Speech
Connect a Call
Join a Conference Call

Verify

Code Sample
Send Phone Verification Code
Check Phone Verification Code
Cancel Phone Verification

Secret Management

Code Sample
List Secrets
Get a Secret
Create a Secret
Delete a Secret

Request More Examples

Please raise an issue to request an example that isn't present within the quickstart. Pull requests will be gratefully received.

Licenses

  • The sample code in this repo is licensed under MIT