Developing with Vern
Use the Vern SDK or REST API to automate browser tasks.
This guide covers the basics of interacting with Vern to programmatically trigger browser automation tasks.
Obtaining API Keys
To interact with Vern, you need an API key.
- Log in to your Vern account.
- Navigate to the API Keys section in the Vern UI (
https://vern.so/api-keys
). - Generate a new API key. Treat this key like a password; keep it secure and do not expose it in client-side code.
Using the Vern SDK
We recommend using our TypeScript/JavaScript SDK for the easiest integration.
Installation
Initialization
Running Tasks
Using the REST API Directly
Alternatively, you can use the REST API directly.
Authentication
All API requests must be authenticated using an x-api-key
header:
Replace YOUR_API_KEY
with the key you obtained.
Making API Requests
The Vern API is a standard REST API that uses JSON for request and response bodies.
Here’s an example of creating a run:
Refer to the Quickstart guide for more examples.
API Reference
For detailed information on all available endpoints, parameters, and response formats, please consult the full API Reference.
Error Handling
The API uses standard HTTP status codes to indicate success or failure. Common codes include:
200 OK
: Request successful.201 Created
: Resource created successfully.400 Bad Request
: Invalid request parameters.401 Unauthorized
: Invalid or missing API key.403 Forbidden
: API key does not have permission.404 Not Found
: Resource not found.429 Too Many Requests
: Rate limit exceeded.500 Internal Server Error
: An error occurred on Vern’s side.
Error responses will typically include a JSON body with more details:
Always check the response body for specific error messages when debugging.