function checkToken() { if ($this->access_token == NULL) { throw new \Exception("obtain access_token first"); } }