Docs/Build with AI

Connect Widget

TL;DR

React: npm install @repull/connect-widget, render <RepullConnect>. Non-React: embed via script tag. Handles OAuth and API key flows for all 50+ PMS platforms.

A drop-in UI component that lets your users connect their PMS in 30 seconds. The widget handles the full OAuth flow, PMS selection, and credential validation — you just listen for the success callback.

React

Install the React package and render the widget in your app:

npm install @repull/connect-widget
import { ConnectWidget } from '@repull/connect-widget'

function ConnectPage() {
  return (
    <ConnectWidget
      apiKey="sk_live_YOUR_KEY"
      workspaceId="YOUR_WORKSPACE_ID"
      onSuccess={(connection) => {
        console.log('Connected:', connection.accountId)
        console.log('PMS:', connection.platform)
        // Save connection.accountId to your database
      }}
      onError={(error) => {
        console.error('Connection failed:', error.message)
      }}
      onClose={() => {
        console.log('Widget closed')
      }}
    />
  )
}

Script Tag Embed

For non-React apps, embed the widget via a script tag. It mounts into any DOM element:

<div id="repull-connect"></div>

<script src="https://cdn.repull.dev/connect-widget.js"></script>
<script>
  RepullConnect.mount('#repull-connect', {
    apiKey: 'sk_live_YOUR_KEY',
    workspaceId: 'YOUR_WORKSPACE_ID',
    onSuccess: function(connection) {
      console.log('Connected:', connection.accountId)
    },
    onError: function(error) {
      console.error('Failed:', error.message)
    },
  })
</script>

Theming

Customize the widget appearance to match your brand:

<ConnectWidget
  apiKey="sk_live_YOUR_KEY"
  workspaceId="YOUR_WORKSPACE_ID"
  theme="dark"
  appearance={{
    accentColor: '#6366f1',
    borderRadius: '12px',
    fontFamily: 'Inter, sans-serif',
  }}
  logo="https://your-app.com/logo.svg"
  title="Connect your property manager"
  description="We'll sync your properties and reservations automatically."
  onSuccess={(connection) => console.log(connection)}
/>

Options Reference

PropTypeDescription
apiKeystringYour Repull API key (required)
workspaceIdstringYour workspace ID (required)
onSuccessfunctionCalled with connection details on successful auth
onErrorfunctionCalled when connection fails
onClosefunctionCalled when user closes the widget
theme"light" | "dark"Color scheme (default: "light")
appearanceobjectCustom accentColor, borderRadius, fontFamily
logostringURL to your logo image
titlestringCustom heading text
descriptionstringCustom description text
platformsstring[]Filter to specific PMS platforms

Filter platforms

Use the platforms prop to show only relevant PMS options. For example, platforms={['guesty', 'hostaway', 'lodgify']} limits the list to three providers.
AI