ChartMogul Developer Hub

Welcome to the ChartMogul Developer Hub. You'll find comprehensive guides and documentation to help you start working with ChartMogul as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Authentication

The ChartMogul API uses HTTP Basic Authentication.

With every request made to the ChartMogul API you must provide your Account Token and Secret Key as basic auth credentials.

You can find your Account Token and Secret Key in the ChartMogul API Admin page. You can reach it by clicking the gear icon in the bottom left of your account. Here you will see an API tab with the Account Token and Secret Key.

Unable to access the Admin page?

You need to be an admin in your ChartMogul account to access this page. If you are unable to access the page to retrieve API credentials, please contact your account owner for access.

Once you have your Account Token and Secret Key, you can quickly verify them by sending us an authentication ping. You will receive a satisfying pong! in response if your credentials are correct.

curl -X GET "https://api.chartmogul.com/v1/ping" \
     -u YOUR_ACCOUNT_TOKEN:YOUR_SECRET_KEY
ChartMogul::Ping.ping
ChartMogul.Ping.ping(config)
            .then(res => console.log(res))
            .catch(err => console.error(err))
<?php

print_r(ChartMogul\Ping::ping()->data);
?>
import cm "github.com/chartmogul/chartmogul-go"

api := cm.API{
    AccountToken: os.Getenv("CHARTMOGUL_ACCOUNT_TOKEN"),
    AccessKey:    os.Getenv("CHARTMOGUL_SECRET_KEY"),
}
ok, err := api.Ping()
if err != nil {
    fmt.Printf("This didn't work out: %v", err)
} else {
    fmt.Println(ok)
}
import chartmogul

config = chartmogul.Config('token', 'secret')
chartmogul.Ping.ping(config).get()
{
  "data":"pong!"
}
true
{ data: 'pong!' }
pong!
<Ping{data='pong!'}>
#<ChartMogul::Ping:0x007ff9f127d628 
@data="pong!", 

Authentication

The ChartMogul API uses HTTP Basic Authentication.