This SDK documentation is outdated. Please do not refer to it, and instead visit the User Guides section.

Skip to main content
Version: 8.2.X

Initialisation

The init function#

import SuperTokens from 'supertokens-website';

SuperTokens.init({
apiDomain: "https://api.example.com"
});
  • To be called at least once before any http request is made to any of your APIs that require authentication.
  • You only need to call this once in your SPA app or on page load.
info

Please see the API Reference for more information on the available config options.

Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI