Nginx Api trouble

I’m unable to get my Api working. I’ve set everything up according to docs (I think) yet remote calls produce this error in Nginx logs

PHP Fatal error:  Declaration of 
Api\V8\OAuth2\Repository\ClientRepository::getClientEntity($clientIdentifier, $grantType, $clientSecret = NULL, $mustValidateSecret = true) 
must be compatible with 
League\OAuth2\Server\Repositories\ClientRepositoryInterface::getClientEntity($clientIdentifier) 
in /var/www/suitecrm/Api/V8/OAuth2/Repository/ClientRepository.php on line 33"

In my nginx conf I have this:

    location ~ /Api/ {
          index   index.php;
          try_files $uri @rewrite_api;

          location ~ \.php {
               include snippets/fastcgi-php.conf;
               fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        }
     }
     location @rewrite_api {
            rewrite ^/Api/access_token(.*)?$    /Api/index.php/$1       last;
            rewrite ^/Api/(.*)?$    /Api/index.php/$1       last;
    }

Can anyone help please?