curl --request POST \
--url https://app.cr3dentials.xyz/v1/partner/verification-tokens \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"appKey": "zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE",
"platforms": [
"zktls-demo"
],
"reference": "order_8f3k2"
}
'import requests
url = "https://app.cr3dentials.xyz/v1/partner/verification-tokens"
payload = {
"appKey": "zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE",
"platforms": ["zktls-demo"],
"reference": "order_8f3k2"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
appKey: 'zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE',
platforms: ['zktls-demo'],
reference: 'order_8f3k2'
})
};
fetch('https://app.cr3dentials.xyz/v1/partner/verification-tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cr3dentials.xyz/v1/partner/verification-tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'appKey' => 'zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE',
'platforms' => [
'zktls-demo'
],
'reference' => 'order_8f3k2'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.cr3dentials.xyz/v1/partner/verification-tokens"
payload := strings.NewReader("{\n \"appKey\": \"zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE\",\n \"platforms\": [\n \"zktls-demo\"\n ],\n \"reference\": \"order_8f3k2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.cr3dentials.xyz/v1/partner/verification-tokens")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"appKey\": \"zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE\",\n \"platforms\": [\n \"zktls-demo\"\n ],\n \"reference\": \"order_8f3k2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cr3dentials.xyz/v1/partner/verification-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"appKey\": \"zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE\",\n \"platforms\": [\n \"zktls-demo\"\n ],\n \"reference\": \"order_8f3k2\"\n}"
response = http.request(request)
puts response.read_body{
"token": "vt_3q2-7wGkTq0bX9aJ1mZt5yQeR8uVnC4dLhP6sFoWiYk",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 429,
"message": "Too Many Requests"
}Create verification token
Prepares a mobile SDK verification on your server. Pass the token to your app, which starts the verification with Zktls.verify(token:) (Swift) or Zktls.verify(activity, token) (Kotlin). The token carries the platforms and the reference, is single use, and expires after 15 minutes. A Development API key creates tokens for your test app key, and a Production API key for your live app key. The response is the object itself, not inside the status/data envelope. See Verifications.
curl --request POST \
--url https://app.cr3dentials.xyz/v1/partner/verification-tokens \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"appKey": "zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE",
"platforms": [
"zktls-demo"
],
"reference": "order_8f3k2"
}
'import requests
url = "https://app.cr3dentials.xyz/v1/partner/verification-tokens"
payload = {
"appKey": "zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE",
"platforms": ["zktls-demo"],
"reference": "order_8f3k2"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
appKey: 'zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE',
platforms: ['zktls-demo'],
reference: 'order_8f3k2'
})
};
fetch('https://app.cr3dentials.xyz/v1/partner/verification-tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cr3dentials.xyz/v1/partner/verification-tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'appKey' => 'zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE',
'platforms' => [
'zktls-demo'
],
'reference' => 'order_8f3k2'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.cr3dentials.xyz/v1/partner/verification-tokens"
payload := strings.NewReader("{\n \"appKey\": \"zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE\",\n \"platforms\": [\n \"zktls-demo\"\n ],\n \"reference\": \"order_8f3k2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.cr3dentials.xyz/v1/partner/verification-tokens")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"appKey\": \"zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE\",\n \"platforms\": [\n \"zktls-demo\"\n ],\n \"reference\": \"order_8f3k2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cr3dentials.xyz/v1/partner/verification-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"appKey\": \"zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE\",\n \"platforms\": [\n \"zktls-demo\"\n ],\n \"reference\": \"order_8f3k2\"\n}"
response = http.request(request)
puts response.read_body{
"token": "vt_3q2-7wGkTq0bX9aJ1mZt5yQeR8uVnC4dLhP6sFoWiYk",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 429,
"message": "Too Many Requests"
}Authorizations
Your partner API key (starts with cr3d_). Send it only in the x-api-key header, never as Authorization: Bearer. Keep it on your server.
Body
The app key of the app that will run the verification: your test key (zk_test_…) or your live key (zk_live_…). The app must be your team's, and the key must match your API key's environment.
^zk_(live|test)_[A-Za-z0-9]{32}$"zk_test_4fK9qL2mXw7RzT1bN8cV3hJ6dY0pS5aE"
The platform ids to verify, in the order the user should see them. Each listed once.
1 - 10 elements^[A-Za-z0-9._-]{1,64}$["zktls-demo"]
Your reference, returned unchanged in every webhook for the verification. Never put personal data in it.
^[A-Za-z0-9._-]{1,128}$"order_8f3k2"
