TrueCheck
Documentation

Official SDKs

Client libraries with full type support for every major language. Install, configure, and start verifying in minutes.

Node.js

Installation
npm install truecheck
Basic Usage
import TrueCheck from 'truecheck';

const tc = new TrueCheck('sk_live_...');

// Send a verification
const verification = await tc.verify.send({
  phone: '+15551234567',
  channel: 'sms',
});

// Check the code
const result = await tc.verify.check({
  verificationId: verification.id,
  code: '482913',
});

console.log(result.valid); // true

Python

Installation
pip install truecheck
Basic Usage
from truecheck import TrueCheck

tc = TrueCheck("sk_live_...")

# Send a verification
verification = tc.verify.send(
    phone="+15551234567",
    channel="sms"
)

# Check the code
result = tc.verify.check(
    verification_id=verification.id,
    code="482913"
)

print(result.valid)  # True

Go

Installation
go get github.com/truecheck/truecheck-go
Basic Usage
package main

import (
    "fmt"
    truecheck "github.com/truecheck/truecheck-go"
)

func main() {
    tc := truecheck.New("sk_live_...")

    // Send a verification
    v, _ := tc.Verify.Send(&truecheck.SendParams{
        Phone:   "+15551234567",
        Channel: "sms",
    })

    // Check the code
    r, _ := tc.Verify.Check(&truecheck.CheckParams{
        VerificationID: v.ID,
        Code:           "482913",
    })

    fmt.Println(r.Valid) // true
}

Ruby

Installation
gem install truecheck
Basic Usage
require 'truecheck'

tc = TrueCheck::Client.new('sk_live_...')

# Send a verification
verification = tc.verify.send(
  phone: '+15551234567',
  channel: 'sms'
)

# Check the code
result = tc.verify.check(
  verification_id: verification.id,
  code: '482913'
)

puts result.valid? # true

Java

Installation
<!-- Maven -->
<dependency>
  <groupId>com.truecheck</groupId>
  <artifactId>truecheck-java</artifactId>
  <version>2.4.0</version>
</dependency>
Basic Usage
import com.truecheck.TrueCheck;
import com.truecheck.model.*;

TrueCheck tc = new TrueCheck("sk_live_...");

// Send a verification
Verification v = tc.verify().send(
    SendParams.builder()
        .phone("+15551234567")
        .channel("sms")
        .build()
);

// Check the code
CheckResult r = tc.verify().check(
    CheckParams.builder()
        .verificationId(v.getId())
        .code("482913")
        .build()
);

System.out.println(r.isValid()); // true

PHP

Installation
composer require truecheck/truecheck-php
Basic Usage
<?php
use TrueCheck\TrueCheck;

$tc = new TrueCheck('sk_live_...');

// Send a verification
$verification = $tc->verify->send([
    'phone' => '+15551234567',
    'channel' => 'sms',
]);

// Check the code
$result = $tc->verify->check([
    'verification_id' => $verification->id,
    'code' => '482913',
]);

echo $result->valid; // true

Missing your language?

Our REST API works with any HTTP client. Let us know what language you need and we will prioritize it.