REST API

Learn how to integrate the Membrane REST API into your application to build an integrations page for your customers.

🖥️

An interactive version of this guide is available in Membrane Console.

Step 1: Generate Authentication Token

To access Membrane through the REST API or Front-end SDK, you need an access token that contains information about your workspace, permissions, and the customer using the integration.

Create an endpoint on your backend that generates JWT tokens. The token must include your workspace key as the issuer (iss), a customer identifier (id), and an expiration time (exp).

You can find a test token in your workspace settings. To learn how to generate production tokens, check the Authentication guide.

Step 2: Display available integrations

Show your users the list of available integrations. Each integration includes metadata like name, logo, and description that you can use to build your UI.

Get list of integrations

Use the "search" query parameter to filter integrations by name.

Reference: listIntegrations

Step 3: Let user connect to a selected integration

When a user clicks "Connect" on an integration, redirect them to the pre-built connection UI. The UI handles OAuth flows, credential collection, and error handling.

Construct the connection URL using your integration ID and authentication token. Display this URL in an iframe or redirect the user to it.

Connection UI URL

https://ui.integration.app/embed/integrations/{INTEGRATION_ID_OR_KEY}/connect?token={TOKEN}

Optional query parameters: redirectUri to redirect users back after connection (required when not using an iframe), allowMultipleConnections=1 to allow multiple connections per integration, name to pre-set a connection name.

ℹ️

Custom connection UI

If you need full control over the connection flow, you can build a custom connection UI that collects credentials and submits them directly to the API. See the Custom connection UI documentation for details.

Step 4: Show connections

When a user connects to an app, a new connection is created. Display the user's connections to show which integrations are active.

Check the disconnected flag on each connection to show the current status. A disconnected connection needs to be re-authenticated.

Get list of connections

Reference: listConnections

Step 5: Re-connect or delete a connection

To re-connect a disconnected connection, redirect the user to the reconnection UI. This re-authenticates the existing connection without creating a new one.

To delete a connection, use the archive endpoint.

Reconnection UI URL

https://ui.integration.app/embed/connections/{CONNECTION_ID}/refresh?token={TOKEN}

Delete connection

Reference: archiveConnection

Reference

Explore the complete API Reference to discover all available endpoints and operations.