Remove Watermark

If you have purchased a subscription, you will have to add a signature to your charts URLs in order to remove the watermark.

Signed URLs look exactly the same as standard chart URL, except they have a sig query parameter. For example, the following URL:


https://get.charttt.com/v1/chart/t_bar/w_400/h_400/bg_ffffffff/ts_14/tt_top/lg_top,center/d_1,2,3/dl_Series%201/?l=A|B|C&sig=736fa49404b93538b403b487cbec1f7c70d4016866e0255c7ee09abaa02af662


will produce the following chart (note there’s no charttt branding on the bottom right)

There are 3 ways to create a signed URL:

  1. Use the chart editor. The URLs you will get from there are automatically signed for you.
  2. Call charttt API with your API secret as Authorization header, and in return you’ll get a signed chart URL. This is the recommended way for generating signed URLs programmatically.
  3. Use your API secret in order to create a signature on your server, and append the signature as a query param to the chart URL.

Below you’ll see instructions for options 2 and 3.

Calling the sign API endpoint

WARNING

Always call this API from your server. You should never expose your API Secret.

Make a POST request to the Sign API endpoint

In the body pass the URL that you’d like to sign, and in the Authorization header set your API secret as a Bearer token.

The API endpoint is: https://get.charttt.com/v1/sign

The Authorization header should look like this Authorization: Bearer APIKEY.niusiv7h...

The body should be a json object with url property:


{"url":"https://get.charttt.com/v1/chart/t_bar/w_400/h_400/bg_ffffffff/ts_14/tt_top/lg_top,center/d_1,2,3/dl_Series%201/?l=A|B|C"}


Here are some examples

curl

curl --request POST 'https://get.charttt.com/v1/sign'

--header 'Authorization: Bearer APIKEY.YOUR_KEY_HERE'

--header 'Content-Type: application/json'

--data-raw '{"url":"https://get.charttt.com/v1/chart/t_bar/w_400/h_400/bg_ffffffff/ts_14/tt_top/lg_top,center/d_1,2,3/dl_Series%201/?l=A|B|C"}'

Node

In node you can use the npm package node-fetch or axios to make the call:

import { fetch } from 'node-fetch';

const url = 'https://get.charttt.com/v1/sign';

const body = {

url: 'https://get.charttt.com/v1/chart/t_bar/w_400/h_400/bg_ffffffff/ts_14/tt_top/lg_top,center/d_1,2,3/dl_Series%201/?l=A|B|C'

}

const options = {

headers: {

Authorization: 'Bearer APIKEY.YOUR_KEY_HERE'

},

body: JSON.stringify(body)

}

fetch(url, options)

.then(response => response.json())

.then(result => console.log(result.url))

.catch(error => console.log('error', error));

PHP

$curl = curl_init();


curl_setopt_array($curl, array(

CURLOPT_URL => "https://get.charttt.com/v1/sign",

CURLOPT_RETURNTRANSFER => true,

CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,

CURLOPT_CUSTOMREQUEST => "POST",

CURLOPT_POSTFIELDS =>"{\"url\": \"https://get.charttt.com/v1/chart/t_bar/w_400/h_400/bg_ffffffff/ts_14/tt_top/lg_top,center/d_1,2,3/dl_Series%201/?l=A|B|C\"}",

CURLOPT_HTTPHEADER => array(

"Authorization: Bearer APIKEY.YOUR_KEY_HERE",

"Content-Type: application/json"

),

));

$response = curl_exec($curl);

curl_close($curl);

echo $response;