Skip to main content

Disabling APIs

To disable an API entirely, all you need to do is override the api implementation with undefined.

For example, if you want to disable the refresh session api from this recipe, all you do is this:

import SuperTokens from "supertokens-node";
import Session from "supertokens-node/recipe/session";

appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
supertokens: {
connectionURI: "...",
recipeList: [
override: {
apis: (originalImplementation) => {
return {
refreshPOST: undefined

You then need to define your own routes that will handle this API call. You can see the Frontend driver interface API spec here

Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI