public function authenticate() { $url = $this->endpoint . 'piction_login/USERNAME/' . $this->username . '/PASSWORD/' . $this->password . '/' . $this->format . '/' . $this->config['url_format'] . '/'; $response = $this->_curlCall($url); $response = $this->helpers->to_json($response); $this->saveToken($response); return $response->SURL; }