--- title: "Install the WebAR SDK" slug: "install-the-webar-sdk" description: "Learn how to install our SDK from CDN or NPM, generate an auth token, and manage dependencies effectively for your web application." updated: 2025-06-06T19:33:09Z published: 2025-06-06T19:33:09Z canonical: "developers.3dcloud.com/install-the-webar-sdk" --- > ## Documentation Index > Fetch the complete documentation index at: https://developers.3dcloud.com/llms.txt > Use this file to discover all available pages before exploring further. # Install the WebAR SDK ## Install From CDN ### **Ask your Account Director for the latest and greatest version to use!** ### Add the script tag 1. Add ```xml ``` to the ** of your document. 2. Example code should look like this: ```xml                WebAR CDN       ``` ## Use From CDN ### [See Examples Here](/3d-cloud-webar/docs/examples-of-the-web-ar-api-sdk-3d-cloud-manual-public-3d-cloud-confluence) --- ## Install From NPM ### Generate a `.npmrc` file in the root directory 1. Navigate to the root directory of your web application where you want to use our SDK. 2. Create a new file and name it `.npmrc` 3. Copy and paste this code into the `.npmrc` file *exactly* as is: 1. ```javascript email=support@3dcloud.com always-auth=true registry=https://nexus.3dcloud.io/repository/npm-group/ _auth= ``` 2. Save the file. NOTE: It won’t be functional yet, now we need to generate the auth token. 4. **Generate the** `_auth` **token** 1. If you already have an account on 3D Cloud’s private nexus NPM repository, you will use your username and password. 2. **If you need a NEW account on 3D Cloud’s private nexus NPM repository:** **contact your 3D Cloud Account Director to get your username and password.** 1. If you’re ready to dive in right now, try a [CDN Implementation](/3d-cloud-webar/docs/install-the-webar-sdk). 3. Open a new Unix or Linux terminal shell. 4. Run the command `echo -n 'myuser:mypassword'| openssl base64` to get your auth token. 1. Replace `'myuser:mypassword'` with the **username** and **password** that you retrieved above. 5. This command will output an encoded key that you will use to replace in your `.npmrc` file. 6. Open your `.npmrc` file and replace the with the output from above. Example: `c2VhdHRsZ**3bT1AM**0QipQN3Z0JHUl` ### Add the Dependency 1. Open your `package.json` in the root directory where you want to use our SDK 2. Navigate to the `"dependencies":` section 3. Add our package as a dependency. 1. **Ask your Account Director for the latest and greatest version to use!** 4. In your package.json, under `"dependencies":` section, add `"@mxt/mxt-webar-sdk": "8.13.0",` 5. When completed, your dependencies package will look something like this: ```javascript "dependencies": {    ...    "@mxt/mxt-webar-sdk": "8.13.0",    ... } ``` 6. Run `npm install` 7. **If this doesn’t work,** please note that we have had some problems with certain versions of NPM accessing our nexus repository. In this case: 1. NPM version MUST be 6.x.x because 7.x.x will NOT connect to our nexus repo 1. To check: open your terminal, and run the command `npm -v` 2. **NOTE:** If using a Mac with a M1 processor, a newer version of node than 8 is required because 8 is not compatible with the ARM architecture. In this case, use node `v14.18.3`, as it is the last version of node to ship with npm v6.x (in this case, `v6.14.15`), also found on [this page](https://nodejs.org/dist/v16.14.0/). ### [See Examples Here](/3d-cloud-webar/docs/examples-of-the-web-ar-api-sdk-3d-cloud-manual-public-3d-cloud-confluence)