public function getProfile($userId = null)
    {
        if (!$userId) {
            if (!$this->check()) {
                throw new \Exception('Not authenticated');
            }
            $userId = $this->data['user_id'];
        }
        return $this->matrix()->request('GET', $this->endpoint('profile/'.urlencode($userId)));
    }