D-ID Client SDK - v3.0.9
    Preparing search index...

    Type Alias BasicAuth

    BasicAuth:
        | { token: string; type: "basic" }
        | { password: string; type: "basic"; username: string }

    A D-ID API key, sent with HTTP basic authentication.

    An API key from D-ID Studio has the form API_USERNAME:API_PASSWORD. Pass it whole as token, or split at the colon into username and password. It gives access to the whole account, so keep it on a server and never ship it in a page; use ClientKeyAuth in a browser. The SDK sends it as Authorization: Basic <credentials>~<connectionId>; the D-ID authorizer strips the per-connection id before it validates the key.

    Type Declaration

    • { token: string; type: "basic" }
      • token: string

        The API key as D-ID Studio shows it (API_USERNAME:API_PASSWORD), or that string base64-encoded. Sent as given.

      • type: "basic"

        Discriminator selecting this variant of Auth.

    • { password: string; type: "basic"; username: string }
      • password: string

        The part of the API key after the colon (API_PASSWORD).

      • type: "basic"

        Discriminator selecting this variant of Auth.

      • username: string

        The part of the API key before the colon (API_USERNAME). It is not the account's email address.