Set Up Components
Components are simple to set up and maintain. Once you’ve integrated a component into your application, it will reflect up-to-date data for the given company that is accessing it in your application.
To set up components, you’ll need to do two things:
- Generate a short-lived access token to make requests on behalf of a given company
- Embed the SchematicEmbed component in your React frontend using a Component ID from Schematic
Both steps are covered below.
1. Set up your server for token exchange
Schematic components use short-lived, company-scoped temporary access tokens to make requests on behalf of a company. You’ll need to issue these from your server, using a secret access token.
If you haven’t already done so, start by installing the Schematic developer SDK of your choosing. Then, you can implement the token exchange for a specific company using its keys:
Node.js
Go
Temporary access tokens are valid for 15 minutes.
2. Use the SchematicEmbed component in your React frontend application
Once you’ve issued a temporary access token and provided it to your frontend React application, you can simply pass it to the SchematicEmbed component along with your Component ID to render it: