public function getShortUrl($url)
    {

        $postData = ['longUrl' => $url];
        $jsonData = json_encode($postData);

        $token = $this->getToken();
        $url = $this->getUrl();

        if (true === empty($token)) {
            throw new \LogicException("Missing pm_tool.google_link_shortener.token");
        }

        if (true === empty($url)) {
            throw new \LogicException("Missing pm_tool.google_link_shortener.url");
        }

        $curlObj = curl_init();

        curl_setopt($curlObj, CURLOPT_URL, sprintf("%s?key=%s", $url, $token));
        curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($curlObj, CURLOPT_HEADER, 0);
        curl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json'));
        curl_setopt($curlObj, CURLOPT_POST, 1);
        curl_setopt($curlObj, CURLOPT_POSTFIELDS, $jsonData);

        $response = curl_exec($curlObj);

        $json = json_decode($response, true);

        curl_close($curlObj);

        if (isset($json['id'])) {
            return $json['id'];
        }

        return 'Api Error: ' . print_r($json, true);
    }