Set up
First, login to your account and specify a customPOST
endpoint in your Embed’s settings.
Then create the endpoint on your server:
Authentication
When we load the<Embed />
component on your frontend, recall that it will need to perform an authentication on your server to generate a valid token:
client.authenticate
:
client.authorize()
method accepts a context
argument where you can pass additional information that you may need to throughout a session. This context
argument will be passed whenever your endpoint is called.
For example:
Loading a Document
When Mirin tries to load a document to display to the user on the editor, theGetDocument
payload will be sent your endpoint:
Storing a Document
When Mirin tries to store a document that the user is editing, theUpdateDocumentContent
payload will be sent your endpoint: