For the complete documentation index, see llms.txt. This page is also available as Markdown.

Authentication

Get credentials and authorize the Multiset client before starting a session

Get Your Credentials

Open the Multiset Developer Portal and navigate to the Credentials section. Copy your Client ID and Client Secret.

Your Map Code or Map Set Code is listed in the Maps section of the portal (format: MAP_XXXXXXXXXX).

Authorize the Client

Create a MultisetClient and call authorize() before starting an AR session. Authorization exchanges your credentials for a short-lived access token used in all subsequent API calls.

import { MultisetClient } from '@multisetai/vps/core';

const client = new MultisetClient({
  clientId: 'YOUR_CLIENT_ID',
  clientSecret: 'YOUR_CLIENT_SECRET',
  mapType: 'map',       // 'map', 'map-set', or 'object-tracking'
  code: 'MAP_XXXXXXXXXX',
});

await client.authorize();

For a MapSet, change mapType to 'map-set' and pass the map set code:

const client = new MultisetClient({
  clientId: 'YOUR_CLIENT_ID',
  clientSecret: 'YOUR_CLIENT_SECRET',
  mapType: 'map-set',
  code: 'MAPSET_XXXXXXXXXX',
});

CORS Configuration

Localization requests are made directly from the browser to the Multiset API. Your domain must be added to the allowlist or every request will fail with a CORS error.

Follow the steps in Configuring Allowed Domains (CORS) before going to production.

localhost and 127.0.0.1 are allowed by default for development.

Environment Variables

Avoid hardcoding credentials in source code. Use environment variables and load them at build time:

Last updated

Was this helpful?