Eternaltwin

Home | Applications

Eternaltwin API

Eternaltwin exposes all its data through a REST API, mounted under /api/v1. Some resources are protected and require the right authorization.

The endpoint reference lives under /api.

Official clients

There are official clients for various platforms. You should use them instead of writing your own client:

PlatformPackageIn the repository
Kotlin / Javanet.eternaltwin:etwinclients/kotlin
Node / TypeScript@eternaltwin/client-nodesdk/node/client
PHPeternaltwin/etwinsdk/php/client
Rubyetwinclients/ruby

See also the examples, one per platform.

Beside the clients, sdk/node and sdk/php also ship the packages that start an Eternaltwin binary from a test suite — @eternaltwin/sdk, eternaltwin/exe, eternaltwin/test-server. They run a server; they are not a way to call one.

What the clients actually cover

These clients are not complete, and they do not all cover the same ground. Help is welcome to improve them.

ClientCovers
KotlingetSelf, getUser, getDinoparcUser, getDinoparcDinoz
NodegetAuthSelf, getUserById, createSession
PHPgetSelf, getUser
Rubyget_user only — there is no get_self, so a Ruby application resolves the token itself

So the common floor is smaller than it looks: every client can retrieve data about a user, and all but the Ruby one can resolve the current authentication (enough to authenticate users with an OAuth access token). Anything else is called over plain HTTP.

The Node client also exposes rawRequest, but it is not a general escape hatch: it sends a GET or a POST to an absolute URI with headers the caller builds itself, and its answer carries only the status and the response headers — never the body. It exists for the redirect-following steps of the authorization flow, not for reading JSON.

None of them covers the forum

The clients stop there: none of them has a single forum type or forum call, whatever the platform. Taking part in the forum on behalf of a user means calling /api/v1/forum over plain HTTP with the bearer token, and is described in The forum from an application.