public function addFromUrls( $download_urls = [], $download_dir = null, $recursive = false, $username = null, $password = null, $archive_password = null, $cookies = null){
        $params = [];

        if( empty( $download_urls)){
            throw new \Exception( 'At lease one url is needed');
        }
        if( count( $download_urls) == 1){
            $params['download_url'] = $download_urls[0];
        } else {
            $params['download_url_list'] = implode( PHP_EOL, $download_urls);
        }

        if( ! empty( $download_dir)){
            $params['download_dir'] = base64_encode( $download_dir);
        }

        if( ! empty( $recursive)){
            $params['download_dir'] = $recursive;
        }

        if( ! empty( $username)){
            $params['username'] = $username;
            $params['password'] = $password;
        }

        if( ! empty( $archive_password)){
            $params['archive_password'] = $archive_password;
        }

        if( ! empty( $cookies)){
            $params['cookies'] = $cookies;
        }

        $data = http_build_query( $params);

        $rest = $this->getService( self::API_DOWNLOAD_ADD);
        $rest->setContentType_XFormURLEncoded();
        $rest->POST( $data);

        return $rest->getResult()['id'];
    }