public function withClientCredentials()
    {
        $command = $this->getCommand('withClientCredentials',
            array('client_id'=>$this->getClientId(),'client_secret'=>$this->getSecret())
        );

        try{
            return $command->execute();
        }catch (ServerErrorResponseException $ex){
            throw new AuthenticationException($ex->getResponse()->getBody(true), $ex->getResponse()->getStatusCode(), $ex);
        }catch (BadResponseException $ex){
            throw new AuthenticationException($ex->getMessage(), 400, $ex);
        }catch(ClientErrorResponseException $ex){
            throw new AuthenticationException($ex->getResponse()->getBody(true), $ex->getResponse()->getStatusCode(), $ex);
        }catch(CurlException $ex){
            throw new AuthenticationException($ex->getMessage(), 400, $ex);
        }
    }