The Launcher API is designed to be used to build widgets upon. This is the foundational API for all of our widgets.

🔗 Accessing the Launcher API

The base URL for the Launcher API is https://launcher.api.influence.io

🔒 Customer Digest

For some endpoints, you will need to provide a digest generated with some customer details and your API key.

The digest is a SHA256 HMAC hash. Concatenate your shop key, customer email and customer external ID as a string and generate the HMAC hash using your API Key.

You can find your API Key from the Influence.io dashboard.

Go to Settings >> __PLATFORM__ Settings >> Platform API Settings.

Where __PLATFORM__ Settings is API Settings or Shopify Settings

const shopKey = "example-com";
const apiKey = "EXAMPLE_API_KEY"
const customerEmail = "[email protected]";
const customerId = "external-123";

// Convert the email to lowercase
customerEmail = customerEmail.toLowerCase();

const hmac = createHmac("sha256", apiKey)
    .update(shopKey + customerEmail + customerId)
    .digest("hex");
$shopKey = "example-com";
$apiKey = "EXAMPLE_API_KEY"
$customerEmail = "[email protected]";
$customerId = "external-123";

// Convert the email to lowercase
$customerEmail = strtolower($customerEmail);

$hmac = hash_hmac("sha256", shopKey . customerEmail . customerId, apiKey);
<div class="influenceio-widgets-init"
  data-shop="{{ shop.permanent_domain }}"
  data-base-url="{{ shop.metafields['influenceio'].baseUrl }}"
  {% if customer %}
    data-customer-email="{{ customer.email | escape }}"
    data-customer-id="{{ customer.id | escape }}"
    data-customer-digest="{{ shop.permanent_domain | append: customer.email | append: customer.id | hmac_sha256: shop.metafields['influenceio'].secret }}"
  {% endif %}
></div>

If you are using the "Headless" widget, you can access the data-customer-digest property that is automatically generated when a customer logs into your Shopify store.