Skip to main content

Getting Started

Authentication

Mozrest provides you with a partnerId and API Token during onboarding. When a venue is created, a unique accessKey is generated for that venue.

CredentialSourcePurpose
partnerIdProvided by MozrestIdentifies your integration
accessKeyGenerated per venueAuthenticates SDK requests for a specific venue

As a security measure, Mozrest validates that the domain embedding the SDK is authorised for your partnerId.

Setup

Building with React?

The steps below cover the script-tag setup. If your application is built with React, embed the SDK as native components instead — see React SDK.

1. Include the SDK scripts

Add the CSS and JS files to your HTML page:

<link rel="stylesheet" href="https://sdk.mozrest.com/latest/sandbox/mozrest-sdk.min.css" />
<script src="https://sdk.mozrest.com/latest/sandbox/mozrest-sdk.min.js"></script>

2. Add a target element

Place a <div> where the SDK content should render:

<div id="mozrest-container"></div>

3. Initialise and display a page

<script type="text/javascript">
const moz = mozrest.init('mozrest-container', {
partnerId: 'your-partner-id',
accessKey: 'venue-access-key',
});
moz.showPage('Listing');
</script>

Environments

EnvironmentCSS URLJS URL
Sandboxhttps://sdk.mozrest.com/latest/sandbox/mozrest-sdk.min.csshttps://sdk.mozrest.com/latest/sandbox/mozrest-sdk.min.js
Productionhttps://sdk.mozrest.com/latest/prod/mozrest-sdk.min.csshttps://sdk.mozrest.com/latest/prod/mozrest-sdk.min.js

Replace sandbox with prod in the URLs when going live.