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 truecheckBasic 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); // truePython
Installation
pip install truecheckBasic 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) # TrueGo
Installation
go get github.com/truecheck/truecheck-goBasic 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 truecheckBasic 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? # trueJava
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()); // truePHP
Installation
composer require truecheck/truecheck-phpBasic 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; // trueMissing your language?
Our REST API works with any HTTP client. Let us know what language you need and we will prioritize it.