diff --git a/core/authorize.php b/core/authorize.php
index 6bc2808..9cb653c 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -153,8 +153,7 @@ function authorize_access_allowed() {
     }
     elseif (!$batch = batch_get()) {
       // We have a batch to process, show the filetransfer form.
-      $elements = drupal_get_form('authorize_filetransfer_form');
-      $output = drupal_render($elements);
+      $output = \Drupal::formBuilder()->getForm('authorize_filetransfer_form');
     }
   }
   // We defer the display of messages until all operations are done.
