curl -X POST https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/messages/ \
-H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
-d '{"kind": "DOCUMENT_REQUEST", "body": "Please confirm the date of birth of the beneficiary.", "requested_documents": ["Proof of address"]}'
from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.transactions.travel_rule.create_message(
"11111111-2222-3333-4444-555555555555",
kind="DOCUMENT_REQUEST",
body="Please confirm the date of birth of the beneficiary.",
requested_documents=["Proof of address"],
)
print(result)
import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.transactions.travelRule.createMessage("11111111-2222-3333-4444-555555555555", {
kind: "DOCUMENT_REQUEST",
body: "Please confirm the date of birth of the beneficiary.",
requested_documents: ["Proof of address"],
});
console.log(result);
ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Transactions.TravelRule.CreateMessage(ctx, "11111111-2222-3333-4444-555555555555", didit.TravelRuleMessageCreateRequest{
Kind: didit.Some(didit.TravelRuleMessageCreateRequestKind("DOCUMENT_REQUEST")),
Body: didit.String("Please confirm the date of birth of the beneficiary."),
RequestedDocuments: didit.Some([]string{"Proof of address"}),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)
import java.util.List;
import me.didit.Didit;
import me.didit.types.TravelRuleMessageCreateRequest;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.transactions().travelRule().createMessage("11111111-2222-3333-4444-555555555555", TravelRuleMessageCreateRequest.builder()
.kind(TravelRuleMessageCreateRequest.Kind.of("DOCUMENT_REQUEST"))
.body("Please confirm the date of birth of the beneficiary.")
.requestedDocuments(List.of("Proof of address"))
.build());
System.out.println(result);
<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->transactions->travelRule->createMessage('11111111-2222-3333-4444-555555555555', [
'kind' => 'DOCUMENT_REQUEST',
'body' => 'Please confirm the date of birth of the beneficiary.',
'requested_documents' => ['Proof of address'],
]);
print_r($result->toArray());
require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.transactions.travel_rule.create_message(
"11111111-2222-3333-4444-555555555555",
kind: "DOCUMENT_REQUEST",
body: "Please confirm the date of birth of the beneficiary.",
requested_documents: ["Proof of address"]
)
puts result.to_h
using System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Transactions.TravelRule.CreateMessageAsync("11111111-2222-3333-4444-555555555555", new TravelRuleMessageCreateRequest
{
Kind = new TravelRuleMessageCreateRequestKind("DOCUMENT_REQUEST"),
Body = "Please confirm the date of birth of the beneficiary.",
RequestedDocuments = new string[] { "Proof of address" },
});
Console.WriteLine(JsonSerializer.Serialize(result));
curl -X POST https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/messages/ \
-H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
-d '{"kind": "DOCUMENT_REQUEST", "body": "Please confirm the date of birth of the beneficiary.", "requested_documents": ["Proof of address"]}'
from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.transactions.travel_rule.create_message(
"11111111-2222-3333-4444-555555555555",
kind="DOCUMENT_REQUEST",
body="Please confirm the date of birth of the beneficiary.",
requested_documents=["Proof of address"],
)
print(result)
import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.transactions.travelRule.createMessage("11111111-2222-3333-4444-555555555555", {
kind: "DOCUMENT_REQUEST",
body: "Please confirm the date of birth of the beneficiary.",
requested_documents: ["Proof of address"],
});
console.log(result);
ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Transactions.TravelRule.CreateMessage(ctx, "11111111-2222-3333-4444-555555555555", didit.TravelRuleMessageCreateRequest{
Kind: didit.Some(didit.TravelRuleMessageCreateRequestKind("DOCUMENT_REQUEST")),
Body: didit.String("Please confirm the date of birth of the beneficiary."),
RequestedDocuments: didit.Some([]string{"Proof of address"}),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)
import java.util.List;
import me.didit.Didit;
import me.didit.types.TravelRuleMessageCreateRequest;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.transactions().travelRule().createMessage("11111111-2222-3333-4444-555555555555", TravelRuleMessageCreateRequest.builder()
.kind(TravelRuleMessageCreateRequest.Kind.of("DOCUMENT_REQUEST"))
.body("Please confirm the date of birth of the beneficiary.")
.requestedDocuments(List.of("Proof of address"))
.build());
System.out.println(result);
<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->transactions->travelRule->createMessage('11111111-2222-3333-4444-555555555555', [
'kind' => 'DOCUMENT_REQUEST',
'body' => 'Please confirm the date of birth of the beneficiary.',
'requested_documents' => ['Proof of address'],
]);
print_r($result->toArray());
require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.transactions.travel_rule.create_message(
"11111111-2222-3333-4444-555555555555",
kind: "DOCUMENT_REQUEST",
body: "Please confirm the date of birth of the beneficiary.",
requested_documents: ["Proof of address"]
)
puts result.to_h
using System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Transactions.TravelRule.CreateMessageAsync("11111111-2222-3333-4444-555555555555", new TravelRuleMessageCreateRequest
{
Kind = new TravelRuleMessageCreateRequestKind("DOCUMENT_REQUEST"),
Body = "Please confirm the date of birth of the beneficiary.",
RequestedDocuments = new string[] { "Proof of address" },
});
Console.WriteLine(JsonSerializer.Serialize(result));
您的应用 API 密钥,可在 Business Console 的“开发者 -> API 密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域:针对每个资源设为无权限、只读或读写,限定于特定工作流或已通过的会话、限定于 IP 地址列表,以及设置到期日期。401 表示密钥错误、已撤销或已过期;403 表示未发送密钥、密钥无权访问该资源或操作,或请求来自其 IP 列表之外的地址;在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF URL 将为 null;没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅 https://docs.didit.me/console/api-keys。