@@ -445,12 +445,81 @@ If you would like to have the system randomly pick a FROM number from the number
445445leave off the second parameter to ` \Vonage\Voice\OutboundCall ` 's constructor, and the system will select a number
446446at random for you.
447447
448- ## Using the Conversations API
448+ ### Using the SimSwap API
449+
450+ SimSwap uses CAMARA standards in order to determine how long a SIM has been inside a cellular device. This
451+ means the auth mechanism is slightly more complex than other APIs. You will need:
452+
453+ > To have your own * Subscriber Number* that has been registered with the Vonage Global Network Platform.
454+ > Your Dashboard Application ID
455+ > Your Private Key
456+
457+ ### Using the Number Verification API
458+
459+ Number Verification uses CAMARA API standards and is used to determine whether a request is valid. Unlike other SDKs,
460+ the SDK is split between the start of the process and the end of the process.
461+
462+ You will need:
463+
464+ > To have your own * Subscriber Number* that has been registered with the Vonage Global Network Platform.
465+ > Your Dashboard Application ID
466+ > Your Private Key, downloaded from the Vonage Dashboard
467+
468+ #### Usage
469+
470+ 1 . Your backend needs to serve a custom URL that will be used to fire off the verification request. To do
471+ this, use the ` buildFrontEndUrl() ` method on the client. When calling this, you'll need to supply the route
472+ your application is expected to receive a callback from containing a unique ` code ` . You will need to have an
473+ authorised phone number in an authorised territory for this to work. Here is dummy example:
474+
475+ ``` php
476+ class VerificationController extends MyFrameworkAbsractController
477+ {
478+ $credentials = new \Vonage\Client\Credentials\Gnp(
479+ '077380777111',
480+ file_get_contents('../private.key'),
481+ '0dadaeb4-7c79-4d39-b4b0-5a6cc08bf537'
482+ )
483+
484+ $client = new \Vonage\Client($credentials);
485+
486+ $verifyUrl = $client->numberVerification()->buildFrontEndUrl(
487+ '07777777777',
488+ 'https://myapp.com/auth/numberVerify'
489+ );
490+
491+ return $this->render('verify.html.twig', [
492+ 'verifyLink' => $verifyUrl
493+ ]);
494+ }
495+ ```
496+
497+ 2 . Your backend then needs to be able to configured to consume the incoming webhook. The SDK will take care
498+ care of handling the Auth methods required to do this, once you have extracted the ` code ` .
499+ The method returns a boolean from the API. Here is an example:
500+
501+ ``` php
502+ $code = $request->get('code');
503+
504+ $result = $client->numberVerification()->verifyNumber(
505+ '09947777777',
506+ $code
507+ );
508+
509+ if ($result) {
510+ Auth::login($request->user())
511+ }
512+
513+ return redirect('login');
514+ }
515+ ```
516+
517+ ### Using the Conversations API
449518
450519This API is used for in-app messaging and is contains a wide range of features and
451- concepts. For more information, take a look at the [ API Documentation] ( )
520+ concepts. For more information, take a look at the [ API Documentation] ( https://developer.vonage.com/en/api/conversation?source=conversation )
452521
453- ### Retrieve a list of Conversations with Filter
522+ #### Retrieve a list of Conversations with Filter
454523
455524``` php
456525$credentials = new \Vonage\Client\Credentials\Keypair(file_get_contents('./path-to-my-key.key', 'my-app-id'));
@@ -464,7 +533,7 @@ $conversations = $client->conversations()->listConversations($filter)
464533var_dump($conversations);
465534```
466535
467- ### Create a Conversation
536+ #### Create a Conversation
468537
469538``` php
470539
@@ -490,7 +559,7 @@ var_dump($response);
490559
491560```
492561
493- ### List Members in a Conversation
562+ #### List Members in a Conversation
494563
495564``` php
496565
@@ -516,7 +585,7 @@ var_dump($members);
516585
517586```
518587
519- ### Create a Member in a Conversation
588+ #### Create a Member in a Conversation
520589
521590``` php
522591
@@ -1200,29 +1269,29 @@ var_dump($response);
12001269
12011270## Supported APIs
12021271
1203- | API | API Release Status | Supported? |
1204- | ------------------------| :--------------------:| :----------:|
1205- | Account API | General Availability | ✅ |
1206- | Alerts API | General Availability | ✅ |
1207- | Application API | General Availability | ✅ |
1208- | Audit API | Beta | ❌ |
1209- | Conversation API | Beta | ❌ |
1210- | Dispatch API | Beta | ❌ |
1211- | External Accounts API | Beta | ❌ |
1212- | Media API | Beta | ❌ |
1213- | Meetings API | General Availability | ✅ |
1214- | Messages API | General Availability | ✅ |
1215- | Number Insight API | General Availability | ✅ |
1216- | Number Management API | General Availability | ✅ |
1217- | Pricing API | General Availability | ✅ |
1218- | ProActive Connect API | Beta | ❌ |
1219- | Redact API | General Availability | ✅ |
1220- | Reports API | Beta | ❌ |
1221- | SMS API | General Availability | ✅ |
1222- | Subaccounts API | General Availability | ✅ |
1223- | Verify API | General Availability | ✅ |
1224- | Verify API (Version 2) | General Availability | ✅ |
1225- | Voice API | General Availability | ✅ |
1272+ | API | API Release Status | Supported? |
1273+ | ------------------------- | :--------------------:| :----------:|
1274+ | Account API | General Availability | ✅ |
1275+ | Alerts API | General Availability | ✅ |
1276+ | Application API | General Availability | ✅ |
1277+ | Audit API | Beta | ❌ |
1278+ | Conversation API | Beta | ❌ |
1279+ | Dispatch API | Beta | ❌ |
1280+ | External Accounts API | Beta | ❌ |
1281+ | Media API | Beta | ❌ |
1282+ | Meetings API | General Availability | ✅ |
1283+ | Messages API | General Availability | ✅ |
1284+ | Number Insight API | General Availability | ✅ |
1285+ | Number Management API | General Availability | ✅ |
1286+ | Pricing API | General Availability | ✅ |
1287+ | ProActive Connect API | Beta | ❌ |
1288+ | Redact API | General Availability | ✅ |
1289+ | Reports API | Beta | ❌ |
1290+ | SMS API | General Availability | ✅ |
1291+ | Subaccounts API | General Availability | ✅ |
1292+ | Verify API | General Availability | ✅ |
1293+ | Verify API (Version 2) | General Availability | ✅ |
1294+ | Voice API | General Availability | ✅ |
12261295
12271296## Troubleshooting
12281297
0 commit comments