Fatal error: Uncaught Error: Call to undefined function get_option()

Instead of doing this, simply write your own function inside the verifyapi.php and then include it in your plugin’s main file, by using this:

require_once('verifyapi.php');

This way, you have access to WordPress’s function inside your verifyapi.php file.

Now, inside your verifyapi.php file, create an Ajax handler (however I would recommend using a REST endpoint) :

add_action('wp_ajax_your_', 'handler_function');
add_action('wp_ajax_nopriv_your_handler_name', 'handler_function');
function photogram_ajax_handler() {
    // Your verification here
}

So far so good. One last step is to change the URL to admin-ajax.php. To do so, use this:

   ...
   url:"<?php echo site_url('/wp-admin/admin-ajax.php'); ?>",
   ...

All set.