इसे छोड़कर कंटेंट पर जाएं

Quickstart

यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।

  1. Create an account and an application. Sign in at trustysweep.com, open Developers, create an organization and an application. No approval step.

  2. Create a test key. In the application, create an API key in test mode (sk_test_…). Test keys work against an isolated simulated tenant with synthetic Gmail and Drive data; nothing touches real users.

  3. Seed test mode. Seeding creates a delegated connection (cxn_…) and simulated sources so you can exercise the full flow.

    Terminal window
    curl -X POST https://api.trustysweep.com/v1/developer/applications/app_…/test-mode/seed \
    -H "Authorization: Bearer sk_test_…" -H "Content-Type: application/json" \
    -d '{"scenario":"storage_pressure"}'
  4. Make a read-only call. The free diagnosis is the canonical first call.

    Terminal window
    curl "https://api.trustysweep.com/v1/diagnosis?connection_id=cxn_…" -H "Authorization: Bearer sk_test_…"
  5. Run a simulated Sweep. Plans in test mode are always simulated: they walk the full lifecycle and issue a receipt without touching any provider.

    const sources = await sweep.sources.list({ connection_id: "cxn_…" }).all();
    const result = await sweep.sweep({
    intent: "sweep",
    connection_id: "cxn_…",
    source_ids: sources.map((s) => s.id),
    selection: { classes: ["promotional", "large_attachment"], min_confidence: 0.85 },
    simulate: true,
    });
    console.log(result.execution.status, result.receipt.receiptId);
    console.log(await sweep.receipts.verify(result.receipt)); // { valid: true }
  6. Go live. Create a live key, add a webhook, and send real end users through Sweep Connect. Live usage is metered against your developer plan; see Usage & billing.