Skip to main content

Enterprise version

This section is dedicated to the paying enterprise version. This plan uses the same API but is watermark free and you can setup your own sub-domain for the perfect integration.

Once subscribed to the enterprise plan you will receive an account id and a secret key. These two keys are mandatory to sign your request and remove the watermark.

Remove Image-Charts watermark by signing URLs

Signing request must be done server-side otherwise anyone will be able to reuse your secret key. Beside signing there are no other computations involved server-side. Image-Charts is still the fastest option compared to server-side charts setup and generation.

You will need to sign the url using HMAC-SHA256 hash algorithm. Before hashing the URL, add your account id inside it using the &icac=YOUR_ACCOUNT_ID parameter, then hash it and add the resulting hash in the &ichm=GENERATED_HASH query parameter.

(easy) Prefer to not encode query parameters before computing the signature

In order to be easier to handle, Image-Charts checks the signature for both encoded and decoded query params. You do not need to worry about generating a string of the whole query with the right URL-safe characters anymore, if the basic query string check does not work, Image-Charts will also try to decode every query parameter pairs and then check the resulting query string against your signature (ichm).

It means you don't have to worry about URL-encoding algorithm and you can generate the signature key based on an unencoded URL-unsafe query string and it will work.

Generating a signature based on unencoded URL parameters is the recommended way as it's much more robust and abstract away the encoding the transportation uses (e.g. webmail proxies, web-browsers, enterprise proxies).

(advanced) What if I want to use special characters like % or & in my title, labels, legends... ?

If you want to use special characters like % or & in chart title, labels, legends... You will need to update our code examples below to encode every query parameter values before signing the query string. Image Charts API will detect that the signature (ichm) was computed against the already encoded query string and will work as expected.

Note that Image-Chart supports ichm parameter anywhere in the query string. It can be at the beginning (e.g. https://image-charts.com/chart?{QUERY_STRING}&ichm=GENERATED_HASH), in the middle (e.g. https://image-charts.com/chart?{QUERY_STRING_CHUNK}&ichm=GENERATED_HASH&{REST_OF_QUERY_STRING}) or at the end (e.g https://image-charts.com/chart?ichm=GENERATED_HASH&{QUERY_STRING}).

As an example, here is a graph signed without watermark:

chart

&icac=documentation
&ichm=d824323e74a1caeebd47d994152639728997b9c572774b79f8ebf20f8b31a405

Signing your URLs will ensure that no one beside you created it and Image-Charts will verify the generated hash to be sure your account created it.

Official Image-Charts libraries

Image-Charts offers SDK in the following languages:

Code snippets

Here are some code examples in various programming languages that rely mainly on their standard library:

// HMAC Helper
const crypto = require('crypto');
const qs = require('querystring');

function sign(secretKey, query) {
return crypto
.createHmac('sha256', secretKey)
.update(query)
.digest('hex');
}

// Now let's generate a chart url that will be sent inside an email or a bot message

// First setup our account
const ACCOUNT_ID = 'MY_ACCOUNT_ID';
const SECRET_KEY = 'MY_SECRET_KEY';

// Then generate the watermark-free url
const rawQuerystring = qs.stringify({
cht: 'bvs',
icac: ACCOUNT_ID, // don't forget to add your account id before signing it
chd: 's:93zyvneTTO',
chs: '400x401',
}, null, null, {
// no need to encode the query string, Image-Charts will decode every parameters by itself to check the signature
// learn why in our documentation https://documentation.image-charts.com/enterprise/
encodeURIComponent: (valueWithoutEncoding) => valueWithoutEncoding
});
const signature = sign(SECRET_KEY, rawQuerystring);
const publicUrl = `https://image-charts.com/chart?${rawQuerystring}&ichm=${signature}`;

// Finally send it to slack or via email, here we simply use console.log
console.log(publicUrl);
Want more?

Don't see your favorite language here? Just ask us !

Online static chart generator

The easiest way to generate a watermark-free Image-Charts -- that is, to sign generated URL with HMAC algorithm -- is to use our online url generator.

Custom domain

Please contact our support that will give you a CNAME to point to. Please also note that Image-Charts custom domain does not support SSL/TLS, must of our customers leverage services like AWS Cloudfront to handle that part.

Editor's custom domain support

In Image-Charts editor's environment tab:

  • click Add new environment
  • set your environment name (e.g. My Company) and custom domain (e.g. http://charts.my-domain.com)
  • click Save

The editor will now display both Image-Charts Production environment and My Company environment everywhere. Uncheck Production to only display charts using http://charts.my-domain.com custom domain.