PHP code example of trustdpv / sdk
1. Go to this page and download the library: Download trustdpv/sdk 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/ */
trustdpv / sdk example snippets
use TrustDPV\TrustDPV;
$tdpv = new TrustDPV(['apiKey' => 'tdpv_live_your_key_here']);
// Verify a user - get their trust score
$result = $tdpv->verify('trustdpv');
// { "valid": true, "username": "trustdpv", "trust_score": 660, "verified": true }
// Full profile with platforms and endorsements
$profile = $tdpv->profile('trustdpv');
// Batch verify up to 50 users at once
$batch = $tdpv->verifyBatch(['seller1', 'seller2', 'seller3']);
// Generate a badge URL for embedding
$badgeUrl = $tdpv->badgeUrl('trustdpv');
// https://trustdpv.com/badge/trustdpv.svg