<script src="https://checkify.me/sdk/v1/checkify.min.js"></script>
読み込み後、
window.Checkify.version
は SDK リリース (現在 1.0.1) を報告します。
SDK はページ読み込み時に次の属性を持つ要素を自動マウントします:
<div
data-checkify-pass="YOUR_PASS_ID"
data-checkify-request="human"
data-checkify-text="Verify with Checkify"
data-checkify-return-url="https://yoursite.com/done"
></div>
非推奨:
data-checkify-launcher
引き続き機能しますが、ログが記録されます。コンソールの警告。代わりにパス + リクエスト タイプを使用してください。
| メソッド | 説明 |
|---|---|
data-checkify-pass | Your Checkify Pass public ID (required) |
data-checkify-request | Request type: human, age_over_18, age_over_21, age_over_25, or age_over_N |
data-checkify-text | Button label text |
data-checkify-return-url | Optional URL to return to after app handoff |
data-checkify-launcher | Deprecated launcher ID — use data-checkify-pass instead |
ウィジェットをマウントする前にグローバル デフォルトを設定します。
Checkify.configure({
baseUrl: 'https://checkify.me',
completeUrl: '/checkify/complete'
});
Render は検証ボタンであり、非表示の入力にトークンを書き込み、検証されるまで送信を無効にします。
Checkify.bindForm('#my-form', {
passId: 'YOUR_PASS_ID',
requestType: 'human',
buttonTarget: '#checkify-wrap',
submitButton: '#submit',
hiddenInput: '#checkify_token',
disableSubmitUntilVerified: true
});
検証が完了するまでコンテンツをブロックするフルページまたはコンテナ ゲート。
Checkify.createHumanGate({
passId: 'YOUR_PASS_ID',
requestType: 'human',
container: '#gate-root',
title: 'Verify to continue'
});
ユーザーが Checkify アプリで検証を完了すると、クエリ文字列に
checkify_request_id
が含まれてサイトに戻る可能性があります。 SDK は、ロード時に
Checkify.checkReturnedVerification()
を自動的に呼び出します。
Start verification programmatically without auto-mounting HTML. Returns a promise that resolves when the user completes or cancels.
const result = await Checkify.verify({
passId: 'YOUR_PASS_ID',
requestType: 'human',
container: document.getElementById('checkify-root')
});
console.log(result.requestId); // send to your server as request_id
window.addEventListener('checkify:verified', (e) => {
console.log('Verified', e.detail);
});
window.addEventListener('checkify:error', (e) => {
console.error('Checkify error', e.detail);
});
Most integrations should verify on form submit with POST /v1/qr/results/verify. For custom frontends without the embed, you may poll status while the user completes verification in the app.
Legacy poll token from older embeds:Request ID + status token from the start response:| メソッド | 説明 |
|---|---|
Checkify.mount(root?) | オプションのルート要素の下にパス ウィジェットをマウント |
Checkify.bindForm(...) | フォーム統合ヘルパー |
Checkify.createHumanGate(...) | 人による検証ゲート UI |
Checkify.verify(options) | プログラムによる検証フロー |
Checkify.checkReturnedVerification() | アプリのハンドオフ後の戻り URL の処理 |