The view/donation/box api request returns a donation box.



Request Parameters

Parameter Valid Input Default Required Description
customer_id unsigned integer - yes The customer_id the data should be requested for
token string - yes The token generated for this request. See token for more information
css string null no Include your css-file via url
target unsigned integer null no Your donation goal
from string (datetime) First day of current month no Start date
to string (datetime) Last day of current month no End date
legend array null no Configure legend

Legend-parameter Valid Input Default Required Description
show boolean true no Activate/deactivate legend
current string "Donations" no Display name above current donation
target string "Goal" no Display name above donation goal


For all examples we are using GuzzleHttpClient.

Get voiceserver from customer_id 1


use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;

function getVoiceserver() {
    try {
        $client = new Client();
        $response = $client->post('',
                'json' => array(
                    'customer_id' => 1,
                    'token' => 'C9FBFB090B8E6BBB1EED94D2259F94D98CDBCB57A710558DA0',
                    'css' => '',
                    'from' => '2015-01-01',
                    'to' => '2015-12-31',
                    'legend' => array(
                        'show' => 'true',
                        'target' => 'Goal',
                        'current' => 'Donations'
    } catch (ClientException $e) {
        throw new Exception($e->getResponse()->getBody()->getContents(), $e->getResponse()->getStatusCode());
    if(is_object($response) && $response->getStatusCode() == 200) {
        $reply = json_decode($response->getBody()->getContents());
    return $reply;

Sample output

    [0] => "<iframe class="view_donation" src="

Sample view

Copyright 2016 by United Gameserver GmbH. Alle Rechte vorbehalten.V3.1.5.1337