I am using Symfony 3.4 and LexikJWTAuthenticationBundle 2.4. Do you know how to retrieve the user that is accessing the API endpoint?
Normally, I would call $user = $this->get('security.token_storage')->getToken()->getUser();
but that doesn't seem to work in this case.