Frontend JavaScript SDK

Alloy Automation Front End Library

The Alloy Automation Front End library provides convenient access to the pre-built modal, which allows easy access to use and embedded Alloy Automation's power into a frontend app.


Install the package with:

npm install alloy-frontend
# or
yarn add alloy-frontend



The Alloy Frontend Library provides a set of functions for integrating with the Alloy platform, allowing users to install, authenticate, edit, update, and perform other operations related to workflows and integrations.


To use the Alloy JavaScript Library, include the library in your project and instantiate the Alloy object.

const Alloy = require('alloy-frontend');

const alloy = Alloy();


To use this library, you must pass over a short lived JSON Web Token generated on your backend with the User Token API. If you are using Alloy Embedded you can find that endpoint here.

Once you have the token, call the setToken method below.


Sets the authentication token for subsequent Alloy API requests.

  • token: The JWT token to be set.



This method is used to render the Alloy Modal for use in Unified API.

Note: this method should ONLY be used for rendering the Alloy Unified API Modal.

  • params: An object containing authentication parameters.
    • app: The name of the application to be authenticated (e.g. "shopify"). Required if you do not specify category
    • category: The name of the Unified API category to show (e.g. "commerce"). Required if you do not specify app
    • callback: A callback function to be executed after authentication.
    • useUnifiedSettings: Boolean indicating whether to use unified settings.
    • integrationId: The ID of the integration for authentication.

Usage Example

const alloy = Alloy();

// Set authentication token

// [Alloy Unified API Only] – Authenticate an application
  app: 'your-app-name',
  callback: (response) => {


Make sure to replace placeholder values such as 'your-auth-token' and 'your-integration-id' with actual values from your Alloy account.