Skip to main content

What you’ll build

A console app that authenticates with an API key against your Ekso install, lists the first page of items, and prints their keys. Five minutes start to finish.

1. New project

2. Provision an API key

If you don’t already have one, mint one via the CLI:
The response includes a rawKey field — capture the value (ek_live_...) once. The backend never returns it again. Set it on your shell:

3. Write the program

Replace Program.cs:

4. Run

Expected output:

What just happened

  • EksoClient was constructed against your install URL with bearer-token auth.
  • client.Api.Field.GetAsync() issued a GET /api/field and deserialized the response into a typed FieldCollection.
  • client.Api.Item.List.PostAsync(...) issued a POST /api/item/list with an ItemListRequest body and deserialized into a typed ItemListResponse.
  • The EksoAuthException and EksoApiException catches surface specific failure shapes — see Error handling for the full hierarchy.

Next ideas

Now that you have a working client, try:
The full surface — every typed method on client.Api.* — maps 1-to-1 to the operations in the API Reference. Auto-completion in your IDE is the fastest discovery path.

Production hardening

  • Don’t hard-code keys. Read from a secrets manager, not from environment variables on a developer’s laptop.
  • Catch the right exceptions. EksoRateLimitException.RetryAfter tells you exactly how long to back off; EksoNetworkException is the only one you should reflexively retry without thought.
  • Set a sensible HTTP timeout. The SDK uses Kiota’s default — wrap calls in CancellationToken if you need tighter bounds.
  • Use RefreshableBearerAuth if you’re acting on behalf of a user — token rotation is the right model. ApiKeyAuth is for service identities.

Next steps