curl -X POST \
https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/decision-email-preview/ \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"new_status": "Approved", "email_language": "en"}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.sessions.preview_decision_email(
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
new_status="Approved",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.sessions.previewDecisionEmail("3fa85f64-5717-4562-b3fc-2c963f66afa6", {
new_status: "Approved",
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Sessions.PreviewDecisionEmail(ctx, "3fa85f64-5717-4562-b3fc-2c963f66afa6", didit.SessionsPreviewDecisionEmailParams{
NewStatus: "Approved",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import me.didit.Didit;
import me.didit.types.SessionsPreviewDecisionEmailParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.sessions().previewDecisionEmail("3fa85f64-5717-4562-b3fc-2c963f66afa6", SessionsPreviewDecisionEmailParams.builder()
.newStatus(SessionsPreviewDecisionEmailParams.NewStatus.of("Approved"))
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->sessions->previewDecisionEmail('3fa85f64-5717-4562-b3fc-2c963f66afa6', [
'new_status' => 'Approved',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.sessions.preview_decision_email(
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
new_status: "Approved"
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Sessions.PreviewDecisionEmailAsync("3fa85f64-5717-4562-b3fc-2c963f66afa6", new SessionsPreviewDecisionEmailParams
{
NewStatus = "Approved",
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"recipient": "person@example.com",
"recipient_source": "email_verification",
"sender": "Example App <no-reply@mail.example.com>",
"sender_name": "Example App",
"sender_email": "no-reply@mail.example.com",
"sender_kind": "customer",
"subject": "Your verification has been approved in Example App",
"html": "<!DOCTYPE html><html><body>...</body></html>",
"language": "en",
"will_be_sent": true,
"not_sent_reason": null,
"preview_token": "eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"
}결정 이메일 미리보기 API: 승인 및 거부 이메일
Didit의 결정 이메일 미리보기로 세션 상태를 바꾸기 전에 사용자가 받을 승인·거부 이메일의 수신자, 발신자, 언어를 확인하세요.
curl -X POST \
https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/decision-email-preview/ \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"new_status": "Approved", "email_language": "en"}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.sessions.preview_decision_email(
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
new_status="Approved",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.sessions.previewDecisionEmail("3fa85f64-5717-4562-b3fc-2c963f66afa6", {
new_status: "Approved",
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Sessions.PreviewDecisionEmail(ctx, "3fa85f64-5717-4562-b3fc-2c963f66afa6", didit.SessionsPreviewDecisionEmailParams{
NewStatus: "Approved",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import me.didit.Didit;
import me.didit.types.SessionsPreviewDecisionEmailParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.sessions().previewDecisionEmail("3fa85f64-5717-4562-b3fc-2c963f66afa6", SessionsPreviewDecisionEmailParams.builder()
.newStatus(SessionsPreviewDecisionEmailParams.NewStatus.of("Approved"))
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->sessions->previewDecisionEmail('3fa85f64-5717-4562-b3fc-2c963f66afa6', [
'new_status' => 'Approved',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.sessions.preview_decision_email(
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
new_status: "Approved"
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Sessions.PreviewDecisionEmailAsync("3fa85f64-5717-4562-b3fc-2c963f66afa6", new SessionsPreviewDecisionEmailParams
{
NewStatus = "Approved",
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"recipient": "person@example.com",
"recipient_source": "email_verification",
"sender": "Example App <no-reply@mail.example.com>",
"sender_name": "Example App",
"sender_email": "no-reply@mail.example.com",
"sender_kind": "customer",
"subject": "Your verification has been approved in Example App",
"html": "<!DOCTYPE html><html><body>...</body></html>",
"language": "en",
"will_be_sent": true,
"not_sent_reason": null,
"preview_token": "eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"
}Approved 또는 Declined로 세션을 설정하고 send_email: true를 지정했을 때 수신자가 받게 될 이메일이 그대로 표시됩니다.
또한 누가 이메일을 받는지, 누가 발신하는지, 그리고 변경을 확인했을 때 실제로 발송되는지 여부도 알려 줍니다.
이메일 수신자
이메일은 사용자 본인의 주소로 발송됩니다. 흐름의 이메일 인증 단계에서 확인된 주소이며, 그런 단계가 없으면 세션을 생성할 때contact_details에 입력한 주소입니다.
recipient_source는 어느 주소가 적용되었는지 알려 줍니다(email_verification 또는 contact_details).
세션에 사용자의 주소가 없으면 recipient, recipient_source, preview_token은 빈 문자열이 되며, 이메일은 발송할 수 없습니다.
화이트 라벨 구성이 적용되면(sender_kind: customer) 이메일은 애플리케이션에서 인증된 발신 도메인에서 발송되고, 그렇지 않으면(sender_kind: didit) Didit의 발신자로부터 발송됩니다.
이메일 발송 여부
send_email: true로 변경을 확인했을 때 이메일이 발송되면 will_be_sent는 true입니다.
false이면 not_sent_reason에 그 이유가 표시됩니다.
not_sent_reason | 의미 |
|---|---|
status_unchanged | 세션에 이미 이 상태가 설정되어 있으므로, 업데이트해도 아무것도 바뀌지 않으며 이메일도 발송되지 않습니다. |
notification_emails_disabled | 세션이 contact_details.send_notification_emails: true 없이 생성되었으므로, contact_details에 입력된 주소로 결정 이메일이 발송되지 않습니다. |
no_recipient | 사용자의 주소를 알 수 없습니다. |
sandbox | 샌드박스 세션이며 수신자가 샌드박스 이메일 발송에 동의하지 않았으므로, 이메일은 시뮬레이션만 됩니다. 이메일 수신 동의를 참조하십시오. |
결정 확인
다음 필드를 사용하여 세션 상태 업데이트 API를 호출합니다.| 세션 상태 업데이트 필드 | 값 |
|---|---|
new_status | 미리보기에서 지정한 것과 같은 new_status |
send_email | true |
email_address | 미리보기의 recipient |
email_language | 미리보기의 language |
email_preview_token | 미리보기의 preview_token |
409를 반환합니다.
다시 미리보기를 수행한 다음, 새 토큰으로 확인하십시오.
관련 항목
- 세션 상태 업데이트: 세션을 승인하거나 거부하고 이메일을 발송합니다.
- 재제출 이메일 미리보기: 대신 재제출 이메일을 미리 봅니다.
- 화이트 라벨: 이메일에 사용되는 발신자와 브랜딩입니다.
인증
Business Console의 Developers -> API keys에서 발급받은 귀하 애플리케이션의 API 키입니다. 기본 키는 전체 접근 권한을 갖습니다. 이름이 지정된 키는 리소스별 none, read, write 범위로 권한을 제한할 수 있으며 특정 워크플로나 승인된 세션, IP 주소 목록, 만료일 등으로 제한할 수도 있습니다. 401은 키가 잘못되었거나 폐기되었거나 만료되었음을 의미합니다. 403은 키가 전송되지 않았거나, 키에 해당 리소스나 작업에 대한 접근 권한이 없거나, 요청이 허용된 IP 목록 외부 주소에서 발생했음을 의미합니다. 세션 경로에서의 404는 해당 세션이 키의 허용 워크플로 또는 상태 범위를 벗어났음을 의미합니다. 미디어 접근 권한이 없는 키는 이미지, 비디오, PDF URL을 null로 수신하며, 세션 write 권한이 없는 키는 세션 링크와 token을 null로 수신합니다. https://docs.didit.me/console/api-keys 를 참고하십시오.
경로 매개변수
인증 세션의 UUID입니다. 사용자(KYC) 및 기업(KYB) 세션 ID를 모두 지원합니다.
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
본문
응답
미리보기 전용입니다. 세션은 변경되지 않으며 이메일도 전송되지 않습니다.
이메일이 전송되는 주소입니다. 사용자의 주소를 알 수 없는 경우 빈 문자열입니다: 이 경우 이메일을 전송할 수 없으며 preview_token도 비어 있습니다. 확인할 때 email_address로 전달하십시오.
"person@example.com"
recipient의 출처입니다. email_verification: 플로우의 이메일 인증 단계에서 사용자가 인증한 주소입니다. contact_details: 세션 생성 시 contact_details에 제공된 주소입니다. 주소가 없는 경우 빈 문자열입니다.
email_verification, contact_details, "email_verification"
이메일 발송에 사용되는 From 헤더입니다.
"Example App <no-reply@mail.example.com>"
sender의 표시 이름 부분입니다.
"Example App"
sender의 주소 부분입니다.
"no-reply@mail.example.com"
customer: 이메일이 애플리케이션의 인증된 발신자 도메인(화이트 라벨)에서 발송됩니다. didit: Didit의 자체 발신자에서 발송됩니다.
customer, didit "customer"
전송된 그대로의 제목 라인입니다.
"Your verification has been approved in Example App"
전송된 그대로의 이메일 HTML이며, 로고는 data URL로 임베드되어 있습니다. 애플리케이션 DOM에 직접 렌더링하지 말고 반드시 샌드박스 처리된 프레임에서 렌더링하세요.
"<!DOCTYPE html><html><body>...</body></html>"
간결한 미리보기를 제공하기 위해 수신자의 메시지 스레드에 보관되는 일반 텍스트 형태의 이메일 내용입니다(HTML은 수신자가 받는 이메일 그대로 유지됨).
"Verification Approved\n\nYour identity has been successfully verified with Acme Pay. No further action is needed on your part."
이메일이 작성된 언어입니다. 요청한 email_language가 제공되지 않는 경우 영어(en)로 설정됩니다.
"en"
send_email: true로 변경 사항을 확인할 때 이 이메일을 발송할지 여부입니다. not_sent_reason이 설정된 경우 false입니다.
true
확인 시 이메일이 전송되지 않는 이유 또는 전송될 예정인 경우 null입니다. status_unchanged: 세션이 이미 이 상태이므로 업데이트로 인해 변경되거나 전송되는 항목이 없습니다. notification_emails_disabled: contact_details.send_notification_emails: true 없이 세션이 생성되었으므로 contact_details에 지정된 주소로 결정 이메일이 전송되지 않습니다. no_recipient: 사용자의 알려진 주소가 없습니다. sandbox: 수신자가 샌드박스 이메일 전송에 동의하지 않은 샌드박스 세션이므로 전송이 시뮬레이션만 됩니다.
status_unchanged, notification_emails_disabled, no_recipient, sandbox, null null
해당 이메일에 대한 서명된 영수증으로, 15분 동안 유효합니다. 세션 상태 업데이트에 email_preview_token으로 전달하십시오. 수신자가 없는 경우 빈 문자열입니다.
"eyJkaWdlc3QiOiI0ZjJhIn0:1uExAm:Pl3x4mpleS1gnatureValue000000000000000"