Integration marketplace app
OverviewCopy
On this page, we will take you through our Integration marketplace app - a NextJS application for quickly deploying an integration/automation marketplace so that your end users can discover and use your Embedded solutions.
The end users will see a library of solutions like this:
They can also see their Solution Instances:
Features:
Quickly get up and running with Tray Native Embedded
Abstracts away all of the GraphQL API calls needed to provision users and create solutions
Can be embedded in an iframe within your own product
Simple JSON Web Token based authentication/authorization flow
Simple JSON configuration for customising the look and feel of the marketplace
Can be used as a template to build a more customised marketplace user experience
PrerequisitesCopy
You will need a master token
This requires an Embedded account and owner / admin privileges.
Getting StartedCopy
Cloning the repoCopy
For this step, we are assuming you are using Github, Vercel supports other git clients such as Gitlab, Bitbucket, and others.
Deploying to VercelCopy
You can deploy this repository directly through Vercel's dashboard.
Using the marketplaceCopy
The goal of this application is to be integrated directly into your own product so that your users can easily take advantage of the integration library you have been building out using Tray Native Embedded.
You can either:
embed the application in your own product using an
<iframe>
tag,or forward users onto the app directly.
1. Generate Verification JSON Web TokenCopy
You can authorize your end users through a JSON Web token (JWT). Here is the required JWT format.
A brief explanation of three sections of your JWT:
You can read more about how JWT tokens work here.
Make sure that you sign this JSON web token on the server side, rather than the client side, as you should make sure your master token remains private.
2. Embed/Forward users to the applicationCopy
Once you have signed a JSON web token, you should then forward the user (either directly or via an iframe) to the application url with the JSON web token in a jwt
query parameter.
Example URL:
https://example.com/?jwt={YOUR_JWT_TOKEN_HERE}
This request will validate the JSON web token you provided and create/update the end user as needed in your Tray account. The end user can then browse and configure the solutions that you have published and create their solution instances.
...thats all
Yep, you read it right. This is all you have to do to get a Tray powered integration marketplace integrated with your own product!
Customizing the deploymentCopy
The goal of this project is to provide a lightweight, but customisable way to deploy an integration marketplace. There are a number of different configuration/customisation options available.
TroubleshootingCopy
Here we list common errors that might occur:
Advanced UsageCopy
The application supports a number of advanced usage options. Refer to our repo docs to unlock the full potential.