How to look up a verdict id with the SDK (client.verify)
Call client.verify({ verdictId }), or use createVerifyClient() if you have no key. It calls GET /api/verify/{verdictId}, sends no key, and uses no credits.
Last updated
Steps
With no key
import { createVerifyClient } from '@clearrun/sdk'; const verifier = createVerifyClient(); const { verified, verdict } = await verifier.verify({ verdictId: '6e07586d-e028-43d6-bec3-0f4821b22ca0' });With a kernel client you already have
const result = await client.verify({ verdictId });
What you get
verified is true when the receipt and signature check out. The response also has signatureValid, chainIntact, receipt and verdict. It has no prompt or answer text.
Not found
An unknown id throws HostedApiError with status 404 and message verdict not found.
Mock mode
In mock mode, verify only knows verdicts made by that same client in memory.