Go uses the
/v2 module path, github.com/context-dot-dev/context-go-sdk/v2. The unversioned path is the older v1 SDK, which lacks the current Scrape, Map URLs, and Brand methods.
Set your API key
Every SDK readsCONTEXT_DEV_API_KEY when you don’t pass a key to the client:
Timeouts and retries
- TypeScript, Python, Ruby, and PHP wait up to 60 seconds for each attempt. Go has no default timeout.
- All five SDKs retry twice, with exponential backoff, after connection errors and
408,409,429, or5xxresponses.
timeoutOpts.milliseconds can be up to 300,000. If you set it above 60,000, raise the SDK timeout as well. Otherwise the SDK gives up and retries while the first attempt may still be running: only Scrape stops when the client disconnects. Each language page shows how to change both settings, and Timeouts covers server deadlines.
Use the low-level request method
SDKs are generated from the API spec and released separately, so an installed version can lag the API. If a typed method doesn’t accept a field you need, send the request with the SDK’s low-level method. It keeps the SDK’s authentication, retries, and error handling.
Check the request body against the API reference before you send it.