Skip to content
Reference FAQ

FAQ

Symptoms, causes and fixes for HotkeyClient and HotkeyWebhook, followed by known limitations and common questions.

On this page

Troubleshooting

HotkeyWebhook.VerifyAndRead always returns null

Check these four causes in order:

  1. Parsed and re-serialized JSON. VerifyAndRead must receive the exact raw HTTP request bytes before any model binder or JSON parser reads the body.
  2. Wrong secret. The Hotkey API key and the webhook endpoint secret are separate credentials. Pass the endpoint's webhook signing secret.
  3. Missing or wrong header. Read the Hotkey-Signature header (t=<unix>,v1=<hex>).
  4. Clock skew or old delivery. Timestamps older or newer than 5 minutes (±300 seconds) are rejected.

CreateBrowserAsync throws HotkeyException with HTTP 409 (browser_exists)

A browser already exists for that ExternalId. Use GetOrCreateBrowserAsync, which recovers the existing browser using HotkeyException.ExistingBrowserId and verifies that its ExternalId matches.

CreateAskAsync throws ArgumentException ("Supply one existing tab or one URL")

AskCreate requires either a positive Tab number or an absolute http/https Url without embedded credentials, never both and never neither. TimeoutMinutes, when specified, must be between 1 and 1440.

CreateEmbedAsync throws ArgumentException

Check that Mode is "view" or "interact", ExpiresIn (if set) is between 30 and 86400 seconds, and Sites (if set) has at most 3 entries.

A method throws ArgumentException ("Invalid Hotkey resource ID")

Resource identifiers (browserId, askId, embedId, downloadId, keyId, endpointId, signInId) are validated before building request paths and may only contain ASCII letters, digits, _ and -.

A pending handoff link expired before the user opened it

Call RenewAskLinkAsync(askId, idempotencyKey) to issue a new expiring link and invalidate the previous one.

A call failed with HTTP 429 and was not retried

HotkeyClient retries safe reads and idempotent writes up to twice when the retry delay is 30 seconds or less. If Hotkey asks for a longer delay, HotkeyClient throws HotkeyException immediately with RetryAfter set so your application or background queue can reschedule without tying up a request thread.

Known limitations

  • Server-side only. Klyroo.Hotkey cannot be used directly from Blazor WebAssembly or client devices because it requires secret API credentials.
  • No browser execution inside .NET. Cloud browser hosting, site permissions, camera/microphone, passkeys, proxy routing and billing are managed by Hotkey itself.
  • Stream copies are not transactional. CopyDownloadToAsync and CopyUsageCsvToAsync leave the destination stream open and can leave partial bytes if the HTTP connection drops mid-stream.
  • Not published to NuGet yet. Build and consume the package locally via dotnet pack src/Klyroo.Hotkey -c Release -o artifacts.

Questions

Is Klyroo.Hotkey included in the Klyroo.Stack meta-package?

No. Klyroo.Hotkey is an independently versioned, optional server-side library so apps that do not need cloud browsers take no extra dependency. Register it alongside AddKlyrooStack() in your server project when needed.

How does Klyroo.Hotkey relate to Klyroo.Agent?

Klyroo.Agent lets AI agents inspect and operate Klyroo UI controllers inside your own application. Klyroo.Hotkey manages external cloud browsers on third-party portals and lets a human step in for sign-ins or confirmations through expiring handoff links.

Does HotkeyClient own the HttpClient?

When you construct new HotkeyClient(http, apiKey) directly, the caller owns and manages http. When you register via AddKlyrooHotkey, IHttpClientFactory manages a SocketsHttpHandler with AllowAutoRedirect = false, UseCookies = false, 2-minute connection pooling, 10-second connect timeout and a 32 KiB header limit.

Does Klyroo.Hotkey work with NativeAOT and trimming?

Yes. Klyroo.Hotkey declares IsAotCompatible = true and IsTrimmable = true and serializes every contract through a source-generated System.Text.Json context with zero runtime reflection. See Platforms.