PHP code example of jaddek / sumsub-sdk-php

1. Go to this page and download the library: Download jaddek/sumsub-sdk-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jaddek / sumsub-sdk-php example snippets




oken    = '';
$secretToken = '';
$userId      = '';
$levelName   = 'demo';

$endpoint = \Jaddek\Sumsub\Http\Factory::buildEndpoint(
    \Jaddek\Sumsub\Http\Endpoint\AccessToken::class,
    $apiToken,
    $secretToken
);

$provider = new \Jaddek\Sumsub\Http\Provider\AccessTokenProvider($endpoint);
$data     = $provider->getAccessToken(
    new \Jaddek\Sumsub\Http\Query\AccessToken\AccessTokenQuery(
        $userId,
        $levelName
    )
);

print_r($data);