UseThatApp Logo

    REST API & SDK reference

    Every endpoint, the SDK function that wraps it in Python and JavaScript, its fields, its errors, and its limits. Base URL https://www.usethatapp.com; JSON in and out. A live OpenAPI schema is at https://www.usethatapp.com/api/v1/schema/ with Swagger UI at https://www.usethatapp.com/api/v1/docs/.

    Endpoints at a glance

    EndpointAuthPythonJavaScript
    GET /api/v1/public/apps/{client_id}/noneget_app_info()getAppInfo()
    GET /api/v1/public/apps/{client_id}/prices/noneget_prices()getPrices()
    GET /api/v1/public/search/none—— (see Search API)
    /buy/{price_id}/ (browser link)—purchase_url(price_id, next=, ref=, email=)purchaseUrl(priceId, { next, ref, email })
    /manage/{client_id}/ (browser link)—manage_url(next=)manageUrl({ next })
    GET /api/v1/orders/{ref}clientget_order(ref)getOrder(ref)
    POST /api/v1/licenses/validateclientvalidate_license_key(key)validateLicenseKey(key)
    POST /api/v1/licenses/{license_id}/regenerate-keyclientregenerate_license_key(license_id)regenerateLicenseKey(licenseId)
    GET /licensing/entitlement/bearerget_entitlement(access_token)getEntitlement(accessToken)
    OpenID Connect under /o/—begin_login, complete_login, refresh, userinfo, logout_urlbeginLogin, completeLogin, refresh, userinfo, logoutUrl

    none: anonymous, CORS-enabled for any origin. client: HTTP Basic with the app's client id and secret, server to server. bearer: an end user's access token from Hosted sign-in. Python also has get_entitlement_async, get_prices_async and get_app_info_async.

    SDKs

    terminal
    pip install usethatapp     # Python 3.9+
    npm install usethatapp     # Node 18+

    Both packages are server-side and framework-agnostic: they take and return plain values, and you wire them into your routes. Source and runnable examples: https://github.com/UseThatApp/python and https://github.com/UseThatApp/javascript.

    Configuration

    The SDKs read environment variables (Python also reads Django settings). configure(...) overrides them in code.

    VariableNeeded forDefault
    UTA_CLIENT_IDEverything except purchase_url—
    UTA_CLIENT_SECRETLicense keys, Hosted sign-in—
    UTA_CLIENT_SECRET_PATHRead the secret from a mounted file instead—
    UTA_REDIRECT_URIHosted sign-in—
    UTA_SCOPESHosted sign-inopenid entitlements
    UTA_API_URLPointing at another instancehttps://www.usethatapp.com
    UTA_ISSUERPointing at another instancehttps://www.usethatapp.com/o
    UTA_REQUEST_TIMEOUT_SECONDS—10
    UTA_CLOCK_SKEW_SECONDSID-token time leeway60

    Store the secret in your host's secret store (or a mounted secret file with UTA_CLIENT_SECRET_PATH), never in source control and never in anything a browser or a shipped binary can read. It is shown once and stored hashed. If it leaks, rotate it on Manage app → Integration or with MCP regenerate_client_secret; the old secret stops working at once.

    App profile

    GET /api/v1/public/apps/{client_id}/
    {
      "client_id": "AbC123dEf456",
      "name": "Acme Analytics",
      "tagline": "Dashboards your team actually reads",
      "listing_mode": "external",
      "url": "https://acmeanalytics.com",
      "marketplace_url": "https://www.usethatapp.com/apps/acme-analytics/"
    }

    listing_mode is external (the default: the app's search card links to its own site) or marketplace (a full product page on usethatapp.com).

    Prices

    GET /api/v1/public/apps/{client_id}/prices/
    {
      "client_id": "AbC123dEf456",
      "app_name": "Acme Analytics",
      "has_free_tier": true,
      "prices": [
        {
          "public_id": "prc_9f2kq8w7",
          "product_id": "prod_9XkKe2QGxN4Ttz1Rw7Ya",
          "product_name": "Pro",
          "amount": "10.00",
          "currency": "usd",
          "is_recurring": true,
          "frequency": "month",
          "trial_period_days": 14,
          "buy_url": "https://www.usethatapp.com/buy/prc_9f2kq8w7/"
        }
      ]
    }
    FieldMeaning
    public_idThe price id (prc_…), used in buy links.
    product_idThe plan's prod_… id. Equal to product_public_id in license and entitlement responses: the plan bought is the plan you gate.
    amountDecimal string, tax-exclusive ("10.00").
    currencyLowercase ISO code ("usd").
    is_recurring, frequencyfrequency is day, week, month, year, or null for a one-time price.
    trial_period_days7, 14, 30 or null: the trial offered, not whether this visitor qualifies.
    buy_urlThe hosted checkout link for this price. Use it as the Buy button's href.
    has_free_tierThe app has a free plan. Free plans have no price rows.

    Both public endpoints answer 404 unless the app is published and its external sales is on (an unknown client_id looks the same). Responses carry Cache-Control: public, max-age=60.

    links
    https://www.usethatapp.com/buy/<prc_id>/?next=<url>&ref=<affiliate code>&email=<address>
    https://www.usethatapp.com/manage/<client_id>/?next=<url>

    Every parameter is optional. next must be HTTPS on the app's registered domain (localhost allowed). After a paid checkout, uta_order=<ref> is appended to the return URL. Behaviour of each parameter: Sell from your website. The SDK builders make no network call; purchase_url needs no configuration and manage_url needs UTA_CLIENT_ID.

    License keys and orders

    Authenticate with HTTP Basic: username = client id, password = client secret.

    terminal
    # Exchange the uta_order from the return URL for the key
    curl -u "$UTA_CLIENT_ID:$UTA_CLIENT_SECRET" \
      "https://www.usethatapp.com/api/v1/orders/$UTA_ORDER"
    
    # Validate a stored key
    curl -u "$UTA_CLIENT_ID:$UTA_CLIENT_SECRET" \
      -H "Content-Type: application/json" -d '{"key": "key_..."}' \
      https://www.usethatapp.com/api/v1/licenses/validate
    
    # Rotate a leaked key (old key dies immediately)
    curl -u "$UTA_CLIENT_ID:$UTA_CLIENT_SECRET" -X POST \
      "https://www.usethatapp.com/api/v1/licenses/$LICENSE_ID/regenerate-key"
    200 response — validate (orders and regenerate add license_key)
    {
      "entitled": true,
      "status": "active",
      "license_id": "lic_...",
      "product_id": "prod_9XkKe2QGxN4Ttz1Rw7Ya",
      "product_public_id": "prod_9XkKe2QGxN4Ttz1Rw7Ya",
      "is_trial": false,
      "period_end": "2026-12-02",
      "canceled_at": null
    }
    FieldMeaning
    entitledWhether this key may use the app now. Gate on this.
    statusSee statuses.
    license_idStable id of the license. Pass it to regenerate.
    product_public_id, product_idThe prod_… plan held now (equal values).
    is_trialIn a free trial.
    period_endISO date the paid period or trial ends; null for one-time purchases.
    canceled_atWhen the license ended for good, or null.
    license_keyOnly from orders and regenerate (regenerate also adds rotated_at).

    An order whose license is not stored yet answers 202 {"status": "processing"}: retry after a second or two.

    Entitlement

    For Hosted sign-in. Send the user's access token as Authorization: Bearer <token>. The path /api/v1/entitlement/ is an identical alias.

    GET /licensing/entitlement/ — 200
    {
      "entitled": true,
      "version": "Pro",
      "product_id": "prod_9XkKe2QGxN4Ttz1Rw7Ya",
      "product_public_id": "prod_9XkKe2QGxN4Ttz1Rw7Ya",
      "status": "active",
      "is_free": false,
      "is_trial": false,
      "period_end": "2026-12-02"
    }
    FieldMeaning
    entitledThe user may use the app now (a paid plan, a trial, or your free plan). Gate on this.
    product_public_id, product_idThe prod_… plan (equal values), or null.
    versionThe plan's display name. Show it; never branch on it.
    statusactive, trialing, one_time_active, free, preview (developer test), or none.
    is_freeThe entitlement is the app's free plan.
    is_trialIn a free trial; period_end is the conversion date.
    period_endISO date the current period ends, or null.

    The response never includes sub; identity comes from sign-in.

    OpenID Connect

    Issuer https://www.usethatapp.com/o; discovery at https://www.usethatapp.com/o/.well-known/openid-configuration. Authorization code with PKCE; the token endpoint takes the client secret. Scopes: openid entitlements. The ID token and userinfo carry only the pairwise sub. Logout is RP-initiated through end_session_endpoint. Any certified OIDC client library works if you are not using the SDK.

    Errors

    Error bodies are {"error": "<code>"}. Every SDK exception subclasses UtaError; names are identical in Python and JavaScript.

    HTTPBody errorWhereSDK exceptionWhat to do
    400messageentitlementUtaErrorThe OAuth client is not linked to an app. Configuration bug.
    401invalid_tokenentitlement, userinfoUtaTokenErrorRefresh or sign in again; after logout, clear the session.
    401invalid_clientlicenses, ordersUtaConfigErrorWrong client id or secret.
    403insufficient_scopeentitlementUtaPermissionErrorSign in again with openid entitlements.
    403service_not_enabledentitlementUtaServiceNotEnabledErrorHosted sign-in add-on is off. Not user-fixable.
    404unknown_key, unknown_order, unknown_licenselicenses, ordersUtaNotFoundError (.code)Never issued for this app.
    404—public apps, pricesUtaErrorApp unknown, unpublished, or external sales off.
    202processingordersUtaOrderProcessingErrorRetry shortly.
    409license_canceledregenerateUtaLicenseCanceledErrorThe license is gone; nothing to rotate.
    429varies (rate_limited on licenses, orders and entitlement; detail on public endpoints)allUtaServerErrorWait Retry-After seconds (retry_after / retryAfter).
    5xx—allUtaServerErrorRetry with backoff.

    Raised locally: UtaConfigError for missing settings, UtaDiscoveryError when the OIDC discovery document or keys cannot be fetched, and UtaAuthError when a sign-in callback fails its state check or lacks a code. A cancelled purchase never raises: it returns entitled: false.

    Rate limits

    SurfaceLimit
    Public app profile and prices120 / minute per IP
    Search API60 / minute per IP
    Order lookup, key validation120 / minute per IP and client
    Key regeneration30 / minute per IP and client
    Entitlement60 / minute per token
    MCP server60 / minute per token

    AI agents: this site is fully pre-rendered — fetch /llms.txt for an indexed summary of every page, or /llms-full.txt for the whole documentation as one Markdown file.