You must add ROLE_API in the role_hierarchy your security.yml:
role_hierarchy: # ... ROLE_API: [ROLE_USER]
Users with a ROLE_API rating can then access routes restricted to IS_AUTHENTICATED_FULLY .
Also, if you are using a web server, try using the application using the built-in server (i.e. app/console server:run ).
Apache seems to be modifying the token in the headers.
source share