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
api_key = 'EXAMPLE_API_KEY'
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 = crypto.createHmac("sha256", apiKey)
.update(shopKey + customerEmail + customerId)
.digest("hex");
import hmac
import hashlib
shop_key = "example-com"
api_key = "EXAMPLE_API_KEY"
customer_email = "[email protected]"
customer_id = "external-123"
msg = shop_key + customer_email + customer_id
hmac = hmac.new(api_key.encode(), msg.encode(), hashlib.sha256)
# Digest string to be used
digest = hmac.hexdigest()
$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);
api_key = 'EXAMPLE_API_KEY'
shop_key = "example-com";
customer_email = "[email protected]";
customer_id = "external-123";
msg = shop_key + customer_email + customer_id
digest = OpenSSL::Digest.new('sha256')
hmac = OpenSSL::HMAC.hexdigest(digest, api_key, msg)
<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.