Loading scenes
To load your own scenes we recommend that you use the @novorender/data-js-api
package, but you can also use the Novorender data REST API directly if you prefer.
We will be using the npm package in all our examples.
Public scenes​
Private scenes​
Only scene related endpoints are covered by the NPM package, so for user / authentication endpoints you will have to use the REST API as well.
Username / Password​
Above demo retrieves access token using POST /api/user/login
endpoint which is part of legacy authentication APIs, also known as the V1 REST API. We advise transitioning to the new V2 REST API, which incorporates OAuth 2.0 for authorization.
Active Directory​
To get started authenticating with Active Directory we recommend you use MSAL with the following config:
{
"clientId": "074eb42a-f94a-4a97-b7ad-0a187eb57f96",
"authority": "https://login.microsoftonline.com/{YOUR_TENANT_ID}",
"scopes": ["api://074eb42a-f94a-4a97-b7ad-0a187eb57f96/resource.read", "api://074eb42a-f94a-4a97-b7ad-0a187eb57f96/scene.edit"]
}
Once you have authenticated and acquired an access token you can follow the example for username/password flow, just use the access token you got from AD instead of POST /api/user/login
.
The above documentation regarding Active Directory is only applicable when utilizing the legacy authentication APIs, also known as the V1 REST API.