Comments (5)
Thanks @leonardeveloper.
Do you have a nexmo
entry in config/services.php
?
Your config/nexmo.php
file should look like the following (generated by running php artisan vendor:publish
:
<?php
return [
/*
|--------------------------------------------------------------------------
| API Credentials
|--------------------------------------------------------------------------
|
| If you're using API credentials, change these settings. Get your
| credentials from https://dashboard.nexmo.com | 'Settings'.
|
*/
'api_key' => function_exists('env') ? env('NEXMO_KEY', '') : '',
'api_secret' => function_exists('env') ? env('NEXMO_SECRET', '') : '',
/*
|--------------------------------------------------------------------------
| Signature Secret
|--------------------------------------------------------------------------
|
| If you're using a signature secret, use this section. This can be used
| without an `api_secret` for some APIs, as well as with an `api_secret`
| for all APIs.
|
*/
'signature_secret' => function_exists('env') ? env('NEXMO_SIGNATURE_SECRET', '') : '',
/*
|--------------------------------------------------------------------------
| Private Key
|--------------------------------------------------------------------------
|
| Private keys are used to generate JWTs for authentication. Generation is
| handled by the library. JWTs are required for newer APIs, such as voice
| and media
|
*/
'private_key' => function_exists('env') ? env('NEXMO_PRIVATE_KEY', '') : '',
'application_id' => function_exists('env') ? env('NEXMO_APPLICATION_ID', '') : '',
];
from nexmo-laravel.
Here is my config/services.php
`<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
| default location for this type of information, allowing packages
| to have a conventional place to find your various credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
];
And yes my
config/nexmo.php` is the same with your code.
from nexmo-laravel.
I've just created a new Laravel 5.5 project and things seem to be working fine.
Bootstrap the project:
composer create-project --prefer-dist laravel/laravel blog "5.5.*"
cd blog
composer require nexmo/laravel
Update routes/web.php
to send an SMS to test:
Route::get('/', function () {
Nexmo::message()->send(['from' => "TEST", 'to' => "<number>", 'text' => "Hello World"]);
return view('welcome');
});
php artisan serve
Visit http://127.0.0.1:8000/ - we should get the error you described
Edit .env
and add your credentials:
NEXMO_KEY=
NEXMO_SECRET=
Visit http://127.0.0.1:8000/ again - the message should be sent fine
from nexmo-laravel.
I've just created a new Laravel project using the guide from above and got this new error message.
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
Weird.
Unsure what I've missed.
from nexmo-laravel.
Fixed my last error message.
Perhaps it's some sort of installation issue on my end that the API credentials didn't worked.
All good now. Thanks a lot.
from nexmo-laravel.
Related Issues (20)
- Nexmo Issue with getting api_key/secret HOT 8
- Package zendframework/zend-diactoros is abandoned HOT 1
- Laravel 8 compatibility HOT 6
- Vonage Voyagers application: Create a more detailed SMS log HOT 6
- Migrate to Vonage/vonage-php-sdk-core before 10/01/2021 HOT 2
- nexmo/client 0.4.0 error HOT 3
- Agrinnovation
- @new Verification returns an exception HOT 7
- Ambigious Class Resolution HOT 2
- Using Nexmo in Laravel with Multi-tenancy HOT 2
- web monetization
- Missing ability to search landline-toll-free HOT 8
- Error sending SMS HOT 2
- Error while checking PIN HOT 1
- Larastan warnings HOT 1
- Upgrade vonage/client HOT 2
- Support Laravel 9 HOT 8
- Send SMS for two different phone numbers HOT 1
- Is Inbound Message concatenation supported? HOT 1
- Support Laravel 9 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nexmo-laravel.