diff --git a/full/Changes b/full/Changes
index c367b10..8b2f84e 100644
--- a/full/Changes
+++ b/full/Changes
@@ -12,6 +12,7 @@
 2022-03-28
  - Updated admin filter (admintoken as a form param) and uses 
    it for the closing index reader API. 
+ - Removed unused admin API: clear access token cache.
 
 # version 0.65.1
 
diff --git a/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuTokenService.java b/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuTokenService.java
index 6bbed24..c4dd257 100644
--- a/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuTokenService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuTokenService.java
@@ -10,7 +10,6 @@
 import java.util.Set;
 
 import javax.persistence.NoResultException;
-import javax.servlet.ServletContext;
 import javax.ws.rs.core.Response.Status;
 
 import org.apache.oltu.oauth2.as.request.AbstractOAuthTokenRequest;
@@ -603,24 +602,5 @@
         }
         return dtoList;
     }
-
-    public String clearAccessTokenCache (String adminToken, String accessToken,
-            ServletContext context) throws KustvaktException {
-        if (adminToken != null && !adminToken.isEmpty()
-                && adminToken.equals(context.getInitParameter("adminToken"))) {
-            
-            if (accessToken == null) {
-                tokenDao.clearCache();
-                return "Cache has been cleared";
-            }
-            else {
-                tokenDao.removeCacheEntry(accessToken);
-                return "Access token has been removed from the cache";
-            }
-        }
-        else {
-            throw new KustvaktException(StatusCodes.INCORRECT_ADMIN_TOKEN,
-                    "Admin token is incorrect");
-        }
-    }
+   
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/oauth2/service/OAuth2AdminService.java b/full/src/main/java/de/ids_mannheim/korap/oauth2/service/OAuth2AdminService.java
index 8000b64..d5861d6 100644
--- a/full/src/main/java/de/ids_mannheim/korap/oauth2/service/OAuth2AdminService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/oauth2/service/OAuth2AdminService.java
@@ -3,6 +3,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.oauth2.dao.AccessTokenDao;
 import de.ids_mannheim.korap.oauth2.dao.RefreshTokenDao;
 
@@ -13,12 +14,10 @@
     private AccessTokenDao tokenDao;
     @Autowired
     private RefreshTokenDao refreshDao;
- 
-    
+
     public void cleanTokens () {
         tokenDao.deleteInvalidAccessTokens();
         refreshDao.deleteInvalidRefreshTokens();
+        tokenDao.clearCache();
     }
-
-    
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2AdminController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2AdminController.java
index f51ab78..1d1ce6a 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2AdminController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2AdminController.java
@@ -1,6 +1,5 @@
 package de.ids_mannheim.korap.web.controller;
 
-import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.Response;
@@ -19,13 +18,10 @@
 import de.ids_mannheim.korap.web.OAuth2ResponseHandler;
 import de.ids_mannheim.korap.web.filter.APIVersionFilter;
 import de.ids_mannheim.korap.web.filter.AdminFilter;
-import de.ids_mannheim.korap.web.filter.AuthenticationFilter;
-import de.ids_mannheim.korap.web.filter.BlockingFilter;
 
 @Controller
 @Path("{version}/oauth2/admin")
-@ResourceFilters({ APIVersionFilter.class, AuthenticationFilter.class,
-        BlockingFilter.class, AdminFilter.class })
+@ResourceFilters({ APIVersionFilter.class, AdminFilter.class })
 public class OAuth2AdminController {
 
     @Autowired
@@ -34,19 +30,18 @@
     private OAuth2ScopeService scopeService;
     @Autowired
     private OAuth2ResponseHandler responseHandler;
-    
-    @POST
-    @Path("/token/clean")
+
+    @Path("token/clean")
     public Response cleanExpiredInvalidToken (
             @Context SecurityContext securityContext) {
 
         TokenContext context =
                 (TokenContext) securityContext.getUserPrincipal();
-        
+
         try {
             scopeService.verifyScope(context, OAuth2Scope.ADMIN);
             adminService.cleanTokens();
-            
+
         }
         catch (KustvaktException e) {
             throw responseHandler.throwit(e);
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2Controller.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2Controller.java
index bdc4b18..0b1d438 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2Controller.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/OAuth2Controller.java
@@ -3,7 +3,6 @@
 import java.time.ZonedDateTime;
 import java.util.List;
 
-import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.FormParam;
@@ -60,7 +59,7 @@
  */
 @Controller
 @Path("{version}/oauth2")
-@ResourceFilters({ APIVersionFilter.class })
+@ResourceFilters({ APIVersionFilter.class, AuthenticationFilter.class, BlockingFilter.class })
 public class OAuth2Controller {
 
     @Autowired
@@ -95,7 +94,6 @@
      */
     @POST
     @Path("authorize")
-    @ResourceFilters({ AuthenticationFilter.class, BlockingFilter.class })
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     public Response requestAuthorizationCode (
             @Context HttpServletRequest request,
@@ -192,6 +190,7 @@
      */
     @POST
     @Path("token")
+    @ResourceFilters({APIVersionFilter.class})
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
     public Response requestAccessToken (@Context HttpServletRequest request,
@@ -247,6 +246,7 @@
      */
     @POST
     @Path("revoke")
+    @ResourceFilters({APIVersionFilter.class})
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     public Response revokeAccessToken (@Context HttpServletRequest request,
             MultivaluedMap<String, String> form) {
@@ -271,7 +271,6 @@
 
     @POST
     @Path("revoke/super")
-    @ResourceFilters({ AuthenticationFilter.class, BlockingFilter.class })
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     public Response revokeTokenViaSuperClient (@Context SecurityContext context,
             @Context HttpServletRequest request,
@@ -315,7 +314,6 @@
      */
     @POST
     @Path("revoke/super/all")
-    @ResourceFilters({ AuthenticationFilter.class, BlockingFilter.class })
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     public Response revokeAllClientTokensViaSuperClient (
             @Context SecurityContext context,
@@ -346,7 +344,6 @@
 
     @POST
     @Path("token/list")
-    @ResourceFilters({ AuthenticationFilter.class, BlockingFilter.class })
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
     @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
     public List<OAuth2TokenDto> listUserToken (
@@ -379,21 +376,4 @@
         }
 
     }
-
-    @POST
-    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
-    @Path("token/clear")
-    public Response clearAccessTokenCache (
-            @FormParam("token") String adminToken,
-            @FormParam("access_token") String accessToken,
-            @Context ServletContext context) {
-        try {
-            String response = tokenService.clearAccessTokenCache(adminToken,
-                    accessToken, context);
-            return Response.ok(response).build();
-        }
-        catch (KustvaktException e) {
-            throw responseHandler.throwit(e);
-        }
-    }
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2AdminControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2AdminControllerTest.java
index 50ab44d..24445cd 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2AdminControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2AdminControllerTest.java
@@ -6,6 +6,7 @@
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import com.fasterxml.jackson.databind.JsonNode;
 import com.sun.jersey.api.client.ClientResponse;
 
 import de.ids_mannheim.korap.authentication.http.HttpAuthorizationHandler;
@@ -13,10 +14,13 @@
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.oauth2.dao.AccessTokenDao;
 import de.ids_mannheim.korap.oauth2.dao.RefreshTokenDao;
+import de.ids_mannheim.korap.utils.JsonUtils;
 
 public class OAuth2AdminControllerTest extends OAuth2TestBase {
 
     private String adminAuthHeader;
+    private String userAuthHeader;
+
     @Autowired
     private RefreshTokenDao refreshDao;
     @Autowired
@@ -25,6 +29,8 @@
     public OAuth2AdminControllerTest () throws KustvaktException {
         adminAuthHeader = HttpAuthorizationHandler
                 .createBasicAuthorizationHeaderValue("admin", "password");
+        userAuthHeader = HttpAuthorizationHandler
+                .createBasicAuthorizationHeaderValue("dory", "password");
     }
 
     @Test
@@ -38,8 +44,36 @@
 
         resource().path(API_VERSION).path("oauth2").path("admin").path("token")
                 .path("clean").header(Attributes.AUTHORIZATION, adminAuthHeader)
-                .entity("token=adminToken").post(ClientResponse.class);
+                .get(ClientResponse.class);
+
         assertEquals(0, refreshDao.retrieveInvalidRefreshTokens().size());
         assertEquals(0, accessDao.retrieveInvalidAccessTokens().size());
     }
+
+    @Test
+    public void testCleanTokenWithRevoke () throws KustvaktException {
+
+        int accessTokensBefore = accessDao.retrieveInvalidAccessTokens().size();
+        
+        String code = requestAuthorizationCode(publicClientId, "", null,
+                userAuthHeader);
+
+        ClientResponse response = requestTokenWithAuthorizationCodeAndForm(
+                publicClientId, clientSecret, code);
+        String entity = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(entity);
+
+        String accessToken = node.at("/access_token").asText();
+        testRevokeToken(accessToken, publicClientId, null, ACCESS_TOKEN_TYPE);
+
+        int accessTokensAfter = accessDao.retrieveInvalidAccessTokens().size();
+        assertEquals(accessTokensAfter,accessTokensBefore+1);
+
+        resource().path(API_VERSION).path("oauth2").path("admin").path("token")
+                .path("clean").header(Attributes.AUTHORIZATION, adminAuthHeader)
+                .get(ClientResponse.class);
+
+        assertEquals(0, accessDao.retrieveInvalidAccessTokens().size());
+    }
+    
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ControllerTest.java
index 12e358f..b6cc9ef 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2ControllerTest.java
@@ -39,8 +39,6 @@
 public class OAuth2ControllerTest extends OAuth2TestBase {
 
     public String userAuthHeader;
-    public static String ACCESS_TOKEN_TYPE = "access_token";
-    public static String REFRESH_TOKEN_TYPE = "refresh_token";
 
     public OAuth2ControllerTest () throws KustvaktException {
         userAuthHeader = HttpAuthorizationHandler
@@ -659,26 +657,6 @@
         assertEquals(OAuth2Error.INVALID_GRANT, node.at("/error").asText());
     }
 
-    private void testRevokeToken (String token, String clientId,
-            String clientSecret, String tokenType) {
-        MultivaluedMap<String, String> form = new MultivaluedMapImpl();
-        form.add("token_type", tokenType);
-        form.add("token", token);
-        form.add("client_id", clientId);
-        if (clientSecret != null) {
-            form.add("client_secret", clientSecret);
-        }
-
-        ClientResponse response =
-                resource().path(API_VERSION).path("oauth2").path("revoke")
-                        .header(HttpHeaders.CONTENT_TYPE,
-                                ContentType.APPLICATION_FORM_URLENCODED)
-                        .entity(form).post(ClientResponse.class);
-
-        assertEquals(Status.OK.getStatusCode(), response.getStatus());
-        assertEquals("SUCCESS", response.getEntity(String.class));
-    }
-
     private JsonNode requestTokenList (String userAuthHeader, String tokenType,
             String clientId) throws KustvaktException {
         MultivaluedMap<String, String> form = new MultivaluedMapImpl();
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2TestBase.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2TestBase.java
index b334b65..e039bf1 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2TestBase.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2TestBase.java
@@ -46,6 +46,9 @@
     protected String superClientId = "fCBbQkAyYzI4NzUxMg";
     protected String clientSecret = "secret";
 
+    public static String ACCESS_TOKEN_TYPE = "access_token";
+    public static String REFRESH_TOKEN_TYPE = "refresh_token";
+
     protected ClientResponse requestAuthorizationCode (
             MultivaluedMap<String, String> form, String authHeader)
             throws KustvaktException {
@@ -251,4 +254,23 @@
         assertEquals("SUCCESS", response.getEntity(String.class));
     }
 
+    protected void testRevokeToken (String token, String clientId,
+            String clientSecret, String tokenType) {
+        MultivaluedMap<String, String> form = new MultivaluedMapImpl();
+        form.add("token_type", tokenType);
+        form.add("token", token);
+        form.add("client_id", clientId);
+        if (clientSecret != null) {
+            form.add("client_secret", clientSecret);
+        }
+
+        ClientResponse response =
+                resource().path(API_VERSION).path("oauth2").path("revoke")
+                        .header(HttpHeaders.CONTENT_TYPE,
+                                ContentType.APPLICATION_FORM_URLENCODED)
+                        .entity(form).post(ClientResponse.class);
+
+        assertEquals(Status.OK.getStatusCode(), response.getStatus());
+        assertEquals("SUCCESS", response.getEntity(String.class));
+    }
 }
