Skip to main content
This page takes you from nothing to a first call. Pick your language in any tab: every example on the SDK pages follows it.

1. Install the library

Does npm warn about the Node.js version (EBADENGINE)? The TypeScript package declares Node.js 26.12.1 or later, which is more than the code needs: it runs on Node.js 18 or later. We ran 3.1.1 on Node.js 18, 20, 22, 24 and 26; Node.js 16 fails because it has no built-in fetch. npm only warns on an older Node.js, and refuses to install only when engine-strict is on.
What each library needs, and the version you get, is in The libraries. The Bash library is one script, not a package: its README says how to install it.

2. Make an API key

Open Settings → API keys in the workspace you want to work in (the link opens the one you used last, or your first) and select Create key. Give it a name and choose what it may do: Full access, or a limit to what your application needs (see Choose how much a key may do). The key starts with wdg_org_, and it works in the workspace it was made in. Keep it in an environment variable, so it never lands in your code or your repository:
Platforms that run Widgetic for their own customers use a second kind of key, a partner key. It is sent the same way. See API keys for the two kinds, and API classes for the classes that need a partner key.

3. Make a first call

This lists the widgets your workspace owns, one page of 20. A new workspace has none yet, so the list can be empty.
The Java samples use var and text blocks, so they need Java 15 or later. The library itself runs on Java 8.
The call returns what the API sends: success, data and, for a list, meta. See Pagination for the shape. If the call fails instead, read Requests and errors.

Set the address and a timeout

A library sends every call to https://api.widgetic.com/v1, so there is nothing to set. Two things are worth setting in a service: a timeout, because the default comes from each language’s HTTP client and some wait for ever, and the key, read from the environment as above. Here both are set, with the address spelled out:
A few classes live outside /v1. The public embed routes (PublicEmbedApi) answer at https://api.widgetic.com/embed, so the samples of that class set the address to https://api.widgetic.com.

Next steps

Requests and errors

Page through a list, create something safely, and handle a failed call

API classes

Find the class and the method for an endpoint

Authentication

The kinds of key, and limiting what a key can do

API reference

Every endpoint, with a sample in your language