Skip to content

Commit a04e246

Browse files
committed
docs additions
1 parent e4c90ec commit a04e246

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,35 @@ means the auth mechanism is slightly more complex than other APIs. You will need
454454
> Your Dashboard Application ID
455455
> Your Private Key
456456
457+
#### Usage
458+
459+
There are two available methods for this API: `checkSimSwap` and `checkSimSwapDate`.
460+
461+
Here is an example of using both:
462+
463+
```php
464+
465+
$credentials = new \Vonage\Client\Credentials\Gnp(
466+
'0777888888',
467+
file_get_contents('./private.key'),
468+
'0dadaeb4-7c79-4d39-b4b0-5a6cc08bf537'
469+
);
470+
471+
$client = new \Vonage\Client($credentials);
472+
473+
$swapResult = $client->simswap()->checkSimSwap('07999999999', 500);
474+
475+
if ($swapResult) {
476+
echo "Warning: SIM Swapped recently"
477+
} else {
478+
echo "SIM OK"
479+
};
480+
481+
// Finding the swap date
482+
echo $client->simswap()->checkSimSwapDate('07999999999');
483+
484+
```
485+
457486
### Using the Number Verification API
458487

459488
Number Verification uses CAMARA API standards and is used to determine whether a request is valid. Unlike other SDKs,

0 commit comments

Comments
 (0)