Skip to content

Commit ebf2e11

Browse files
lornajanemheap
authored andcommitted
Adding the unicode SMS sending example code
1 parent e7c8c00 commit ebf2e11

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

sms/send-unicode-sms.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
require_once __DIR__ . '/../config.php';
3+
require_once __DIR__ . '/../vendor/autoload.php';
4+
5+
$basic = new \Nexmo\Client\Credentials\Basic(NEXMO_API_KEY, NEXMO_API_SECRET);
6+
$client = new \Nexmo\Client($basic);
7+
8+
$message = $client->message()->send([
9+
'to' => TO_NUMBER,
10+
'from' => 'Acme Inc',
11+
'text' => 'こんにちは世界',
12+
'type' => 'unicode'
13+
]);
14+
15+
var_dump($message->getResponseData());

0 commit comments

Comments
 (0)