Embed Inline
Embed APIANT Inline in your page: backend-issued link token for end-user identity, install automation bundles by folder name, manage automation state.
APIANT Inline embeds APIANT's automation UI directly into your web page. The host page identifies the end-user via a backend-issued link token, then installs prebuilt automation bundles by folder name. This page documents the host-page contract.
1. Include the Inline script
Replace XXXXX.com with your APIANT server domain and YYYYY with your apiant_inline_key.
<script src="https://XXXXX.com/appJS/apiant_inline.js?apiant_inline_key=YYYYY" type="text/javascript"></script>
The loader creates and appends <div id="embed_apiant_inline"> to document.body automatically. To control DOM placement, add the div explicitly anywhere in the page; the loader detects it and skips the auto-create.
The Inline UI looks for a theme file named theme_inline_{apiant_inline_key}.json on the server. If none is found, the default system theme is used.
2. Mint a link token from your backend
End-user identity is established through a single-use link token issued by APIANT to your backend. The token is then handed to the browser.
apiant_inline_secret is server-only. apiant_inline_key is the public, domain-locked identifier; apiant_inline_secret is its paired credential and must never be exposed in client-side code.
curl -X POST https://XXXXX.com/appServices?command=createInlineLinkToken \
-d "apiant_inline_key=YYYYY" \
-d "apiant_inline_secret=ZZZZZ" \
-d "external_user_id=user-12345" \
-d "email=jane@example.com" \
-d "firstname=Jane" \
-d "lastname=Doe" \
-d "timezone=US/Eastern"
Response:
{"link_token": "a3f9c2e84b1d4f6a9e0c7b5d2f8a1c43", "expires_in": 600}
The token is single-use and expires in 10 minutes. Mint a fresh token each time the user loads the page.
external_user_id is your stable identifier for the end-user. APIANT stores it as an attribute on the person record. Subsequent calls with the same identifier bind to the same person row regardless of email changes. Two distinct identifiers with the same email get separate APIANT persons — APIANT does not merge by email.
3. Authenticate the session
When the script signals it has loaded, hand the link token to apiant_authenticate.
function apiant_handleInlineLoaded() {
apiant_authenticate({link_token: "a3f9c2e84b1d4f6a9e0c7b5d2f8a1c43"});
}
function apiant_handleSetAccountComplete(objPerson) {
if (objPerson.error) {
alert(objPerson.error);
return;
}
// objPerson contains identifying information about the bound account
}
apiant_authenticate looks up or creates the person keyed by the external_user_id from the token, binds it to the session, and fires apiant_handleSetAccountComplete. Call it before any other Inline API.
4. Install an automation bundle
Bundles live in the templates account. Each bundle is a folder; the folder's automations are installed together. Folder names within the templates account are unique and serve as the install key.
function handleButtonClick() {
apiant_install({folder_name: "ZoomConnect APPT v4.01 (Master)"});
}
function apiant_handleInstallComplete(objResult) {
if (objResult.error) {
alert(objResult.error);
return;
}
// Bundle installed and activated
}
On success the installed automations are turned on and ready to process data. On failure the error string reaches apiant_handleInstallComplete — APIANT does not show its own dialog. The host page is responsible for surfacing errors to the user.
A single-automation install is the same call: place the one automation in its own folder and pass that folder's name.
5. List and toggle automations (optional)
The calls below are available if your host page surfaces automation management to the end-user — for example, a "your automations" view with pause/resume controls. They are not required for the install flow above.
// pageNumberZeroBased=0, pageSize=-1 (all), sort="name" or "id"
apiant_getActiveAutomations(0, -1, "name");
apiant_getInactiveAutomations(0, -1, "name");
function apiant_handleGetActiveAutomationsComplete(objResult) {
if (objResult.error) { alert(objResult.error); return; }
var jsonObj = JSON.parse(objResult.json);
}
function apiant_handleGetInactiveAutomationsComplete(objResult) {
if (objResult.error) { alert(objResult.error); return; }
var jsonObj = JSON.parse(objResult.json);
}
function apiant_handleTurnAutomationOnOffComplete(objResult) {
if (objResult.error) { alert(objResult.error); return; }
if (objResult.subscription_error) { alert(objResult.subscription_error); }
}
Call apiant_turnAutomationOn(automation_uuid) or apiant_turnAutomationOff(automation_uuid) to toggle a specific automation.