Gates NeuphonicSDK on-device usage. Called by the SDK's outer gate (__validate_customer_token) on every initialize(apiToken:).

Two checks, both required:

  1. The caller's on-device API key is valid (on_device_api_keys, a table separate from streaming api_keys).
  2. The customer + device pair is allowed and logged server-side against the_stage Supabase (log_device_auth) — never called from the device directly, since that would require shipping a Supabase service key inside the app.

When the SDK sends a nonce, the response is signed (see on_device_signing) and the SDK arms the engine only if the signature verifies, so a faked 200 from anywhere else is useless. Without a nonce the response stays unsigned, for SDK builds that predate signing.

post/on-device/auth

Request

  • Base URL
    https://api.neuphonic.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.neuphonic.com/on-device/auth
  • Auth
    none declared

Headers

X-API-KEYstring nullable

Request body

deviceIdstring required
noncestring nullable

Response

Successful Response

unknown required

Changes