infinity6i6 Builders Platform
Documentation

Getting started

I6Sdk

Web SDK constructor and access to services.

1 min read

The bundle exposes the window.I6Sdk class. Each instance gives access to the SDK services.

new I6Sdk(config?)

js
new window.I6Sdk(config?)
Name Type Required Description
config object No Instance configuration.
config.baseUrl string No Platform address used for calls. The default is the sandbox environment.

Returns: an I6Sdk instance.

Minimal example

html
<script src="https://cdn.infinity6.ai/releases/sdkweb/latest/bundle/i6sdk-web.js"></script>
<script type="module">
  async function main() {
    const sdk = new window.I6Sdk();
    const user = await sdk.auth().requireUser();
    if (!user) return;
  }
  main();
</script>

Notes

  • Values passed in config override the default values.

sdk.auth()

js
sdk.auth()

Returns: the authentication service. See auth().

sdk.ingest()

js
sdk.ingest()

Returns: the file upload service. See ingest().

Next

auth()

Querying and requiring the session.

See auth()