Skip to main content
The SDKs are thin, typed wrappers over the HTTP API. They set the x-api-key header, serialize requests, and return typed results or errors. They talk to Roolink only. Requests to the target site still go through your own TLS client, as described in Set up your HTTP client.

Create a client

One client serves every endpoint. Read the key from the environment rather than writing it into code.

What each method calls

The SDKs cover Akamai Web and Akamai BMP. Request objects use the same field names as the HTTP API, so the API reference is the source of truth for every parameter. Go methods take a context.Context first; Python and TypeScript methods take the request alone. Go’s ParseScript takes the script as bytes.

Without an SDK

Every Roolink endpoint is a POST with a JSON body and a JSON response, except /parse, which takes the raw script as text/plain. Any HTTP client works. Three things to get right:
  • Send x-api-key on every request, and Content-Type: application/json on JSON requests.
  • Send script bodies exactly as fetched. Do not trim, re-encode or minify them.
  • Retry only on 503, after a short pause. Every other error means the request needs to change.

Errors

The SDKs raise an exception (Python, TypeScript) or return an error (Go) whenever Roolink answers with a status other than 200. The message carries Roolink’s error field when there is one, for example no device profile for user agent. See Errors and status codes for what each status means and what to retry.