1. GETTING STARTED
Perare.io SDK Documentation
  • Introduction
  • GETTING STARTED
    • Install the SDK
    • Authentication
    • SDK Test Guide
    • Our API Services
  • PRICING
    • Perare Pricing SDK
  • LEGALS
    • Terms and Conditions
  1. GETTING STARTED

Install the SDK

Overview | App SDK | REST API
Perare Web SDK package for displaying a Proplink-verified map widget on your website.
npm install perare-web-sdk
Add those two style files to the bundle (e.g. with Webpack)
- "mapbox-gl/dist/mapbox-gl.css",
- "perare-web-sdk/dist/index.css"
If you're using a CSS loader like webpack css-loader, you can import the CSS directly in your JavaScript/Typescript.
import 'mapbox-gl/dist/mapbox-gl.css';
import 'perare-web-sdk/dist/index.css';
Or add those css files as externally-added to bundle css files.

Bundle size#

This package depends on mapbox-gl-js, which is quite big package. Almost all map initializations are cached, but to prevent increased initial-bundle size, use lazy-loading of component/module.

Usage#

import { PerareWebSdk } from "perare-web-sdk";

// first you need to create and wait toapprove of proplink
const id = createdProplink.id;
PerareWebSdk.register({
    token: '<YOUR_TOKEN>',
    apiUrl: '<SANDBOX/PROD API URL>',
});

PerareWebSdk.drawMapBanner({
    container: document.getElementById('perare-map-banner'),
    proplinkId: id,
});
Modified at 2025-07-16 05:41:01
Previous
Introduction
Next
Authentication
Built with