> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Widget Context

> Public read endpoint keyed by the widget session token - no API key required. Returns the widget context plus the status of every proof, so you can poll it to detect completion; completed_at becomes non-null once a proof is verified. A SATOSHI_TEST proof can sit at status PENDING while its deposit is seen on-chain but unconfirmed - a background job automatically rechecks it and completes it once the deposit confirms, so no client action is needed while it waits. Each proof carries the fields its method needs: deposit_address, expected_amount, and its own expires_at for SATOSHI_TEST; challenge for MESSAGE_SIGNING. Prefer the travel_rule.status.updated webhook over polling when the session is linked to a transfer.

export const AgentPromptAccordion = ({prompt, title = "AI Agent Integration Prompt"}) => {
  const [copied, setCopied] = React.useState(false);
  const handleCopy = e => {
    e.stopPropagation();
    if (!prompt) return;
    navigator.clipboard.writeText(prompt.trim()).then(() => {
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    });
  };
  const agents = ["Claude Code", "Codex", "Cursor", "Devin", "Windsurf", "GitHub Copilot"];
  return <div className="didit-agent-card">
      {}
      <div className="didit-agent-titlebar">
        <div className="didit-agent-dots" aria-hidden="true">
          <span className="didit-agent-dot didit-agent-dot-red"></span>
          <span className="didit-agent-dot didit-agent-dot-yellow"></span>
          <span className="didit-agent-dot didit-agent-dot-green"></span>
        </div>
        <span className="didit-agent-filename">{title}</span>
        <button type="button" className={`didit-agent-copy ${copied ? "didit-agent-copy-copied" : ""}`} onClick={handleCopy} title="Copy prompt to clipboard" aria-label={copied ? "Copied!" : "Copy prompt to clipboard"}>
          {copied ? <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
              </svg>
              <span>Copied</span>
            </> : <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <rect x="5" y="5" width="9" height="9" rx="1.5" stroke="currentColor" strokeWidth="1.5" />
                <path d="M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5" stroke="currentColor" strokeWidth="1.5" />
              </svg>
              <span>Copy</span>
            </>}
        </button>
      </div>

      {}
      <pre className="didit-agent-body"><code>{prompt.trim()}</code></pre>

      {}
      <div className="didit-agent-footer">
        <span className="didit-agent-footer-label">Paste into</span>
        <div className="didit-agent-chips">
          {agents.map(name => <span key={name} className="didit-agent-chip">{name}</span>)}
        </div>
      </div>
    </div>;
};

<AgentPromptAccordion
  title="Get Widget Context API Prompt"
  prompt={`Read the public context of a wallet-ownership widget session - the same endpoint the hosted widget page itself is driven by. Poll it to track proof progress from your backend.

Endpoint:
GET https://verification.didit.me/v3/travel-rule/widget/{token}/

Authentication:
None - the widget token in the URL path is the credential. Treat the token as a secret.

What to read from the response:
- completed_at - non-null once a proof has been verified. This is the completion signal.
- allowed_methods - which proof methods this session offers (MESSAGE_SIGNING, SATOSHI_TEST, SCREENSHOT, SELF_DECLARATION).
- transfer_status - the linked Travel Rule transfer's status, when the session was minted with a transaction_id.
- proofs[] - per-proof progress. A SATOSHI_TEST proof carries deposit_address, expected_amount, and its own expires_at; a MESSAGE_SIGNING proof carries the challenge string. A SATOSHI_TEST proof can sit at status PENDING while its deposit is seen on-chain but unconfirmed - a background job completes it automatically once it confirms.
- wallet_address, chain, holder_name, vasp_name, callback_url, expires_at.

Failure modes:
- 404 - unknown token.
- 410 - the session expired without completing.

Prefer travel_rule.status.updated webhooks over polling when the session is linked to a transfer.

Full guide: /transaction-monitoring/wallet-ownership-widget#detect-completion.`}
/>


## OpenAPI

````yaml GET /v3/travel-rule/widget/{token}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: Identity verification API. Authenticate with x-api-key header.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/travel-rule/widget/{token}/:
    get:
      tags:
        - Travel Rule
      summary: Get wallet-ownership widget context
      description: >-
        Public read endpoint keyed by the widget session token - no API key
        required. Returns the widget context plus the status of every proof, so
        you can poll it to detect completion; completed_at becomes non-null once
        a proof is verified. A SATOSHI_TEST proof can sit at status PENDING
        while its deposit is seen on-chain but unconfirmed - a background job
        automatically rechecks it and completes it once the deposit confirms, so
        no client action is needed while it waits. Each proof carries the fields
        its method needs: deposit_address, expected_amount, and its own
        expires_at for SATOSHI_TEST; challenge for MESSAGE_SIGNING. Prefer the
        travel_rule.status.updated webhook over polling when the session is
        linked to a transfer.
      operationId: getTravelRuleWidgetContext
      parameters:
        - name: token
          in: path
          required: true
          description: Opaque session token returned when the widget session was minted.
          schema:
            type: string
      responses:
        '200':
          description: The widget context and proof statuses.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleWidgetContext'
        '404':
          description: Unknown token.
        '410':
          description: The session expired without completing.
      security: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: curl https://verification.didit.me/v3/travel-rule/widget/{token}/
components:
  schemas:
    TravelRuleWidgetContext:
      type: object
      properties:
        vasp_name:
          type: string
          description: >-
            Legal name from your VASP profile, shown to the customer in the
            widget. Empty when no profile exists.
        wallet_address:
          type: string
        chain:
          type: string
        holder_name:
          type: string
        allowed_methods:
          type: array
          items:
            type: string
            enum:
              - MESSAGE_SIGNING
              - SCREENSHOT
              - SATOSHI_TEST
              - SELF_DECLARATION
          description: >-
            Proof methods available for this session. MESSAGE_SIGNING requires a
            supported chain family, SATOSHI_TEST requires a
            satoshi_deposit_address on the session, SCREENSHOT requires the
            allow_screenshot_proof setting, and SELF_DECLARATION requires the
            allow_self_declaration setting.
        transfer_status:
          type: string
          nullable: true
          description: >-
            Status of the linked Travel Rule transfer. Null when the session was
            minted without a transaction_id.
        callback_url:
          type: string
          description: >-
            Where the widget returns the customer after completion. Empty when
            not set.
        expires_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: Non-null once a proof has been verified.
        proofs:
          type: array
          items:
            $ref: '#/components/schemas/TravelRuleWidgetProofSummary'
        customization:
          type: object
          nullable: true
          description: >-
            The application's whitelabel customization (colors, logo, font
            family) when white label is enabled - the widget renders with the
            same branding as the verification flow. Null otherwise.
    TravelRuleWidgetProofSummary:
      type: object
      properties:
        proof_id:
          type: string
          format: uuid
        method:
          type: string
          enum:
            - MESSAGE_SIGNING
            - SATOSHI_TEST
            - SCREENSHOT
            - SELF_DECLARATION
        status:
          type: string
          enum:
            - PENDING
            - VERIFIED
            - REJECTED
            - EXPIRED
          description: >-
            PENDING on a SATOSHI_TEST proof means the deposit has been seen
            on-chain but has not yet reached enough confirmations; a background
            job automatically rechecks it and moves it to VERIFIED once it
            confirms, with no resubmission needed. REJECTED means a genuinely
            wrong deposit was submitted (absent, wrong sender, or wrong amount).
            EXPIRED means the proof's own test window closed before a valid
            deposit was seen.
        wallet_address:
          type: string
        chain:
          type: string
        deposit_address:
          type: string
          nullable: true
          description: >-
            Deposit address the customer must send the Satoshi test amount to.
            Present only on a SATOSHI_TEST proof.
        expected_amount:
          type: string
          nullable: true
          description: >-
            Exact on-chain amount, in the deposit's native currency, the Satoshi
            test deposit must match. Present only on a SATOSHI_TEST proof.
        expires_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Deadline for this proof's own Satoshi test window. Present only on a
            SATOSHI_TEST proof; the widget session's own expires_at is extended
            to cover it when SATOSHI_TEST is offered.
        challenge:
          type: string
          nullable: true
          description: >-
            Didit-issued message the customer signs with their wallet. Present
            only on a MESSAGE_SIGNING proof.
        created_at:
          type: string
          format: date-time

````