Skip to main content
This guide walks you through setting up the Vern SDK and connecting your application to receive data.

1. Get your API key

  1. Log in to your Vern account.
  2. Navigate to API Keys in the dashboard.
  3. Generate a new API key. Keep it secure and never expose it in client-side code.

2. Install the SDK

npm install vern

3. Initialize the SDK

Import and initialize the Vern SDK with your API key:
import Vern from "vern";

const vern = Vern({ apiKey: "YOUR_API_KEY" });

4. Set up webhooks

Configure a webhook endpoint to receive data from Vern. When events occur — like a workbook export or a Scout run completing — Vern sends an HTTP POST request to your endpoint. You can configure your webhook URL in the Vern dashboard.
{
  "id": "run_123",
  "task": "Get car details",
  "status": "completed",
  "inputs": {
    "registration": "YLG19A"
  },
  "response": {
    "carDetails": {
      "make": "Hyundai",
      "model": "i30",
      "year": "2017"
    }
  },
  "created_at": "2024-01-01T00:00:00Z",
  "completed_at": "2024-01-01T00:00:02Z"
}
Learn more about webhook events and verification in the Webhooks guide.

5. Run a Scout task (optional)

If you’re using Scouts to scrape data from customer systems, you can trigger runs programmatically:
const run = await vern.runs.create({
  taskId: "getCarDetails",
  inputs: { registration: "YLG19A" },
});
Learn more about creating tasks and managing runs in the Scouts section.

Next steps

  • Developing with Vern — API authentication, error handling, and SDK details
  • Webhooks — Event types, verification, and best practices
  • Scouts — Create browser automation tasks to scrape customer data