diff --git a/packages/nocodb/src/lib/meta/api/apiTokenApis.ts b/packages/nocodb/src/lib/meta/api/apiTokenApis.ts index 11b9b3627c..dea013346d 100644 --- a/packages/nocodb/src/lib/meta/api/apiTokenApis.ts +++ b/packages/nocodb/src/lib/meta/api/apiTokenApis.ts @@ -14,7 +14,7 @@ export async function apiTokenCreate(req: Request, res: Response) { res.json(await ApiToken.insert({ ...req.body, fk_user_id: req['user'].id })); } export async function apiTokenDelete(req: Request, res: Response) { - const apiToken = await ApiToken.getByToken(req.params.apiTokenId); + const apiToken = await ApiToken.getByToken(req.params.token); if ( !req['user'].roles.includes(OrgUserRoles.SUPER_ADMIN) && apiToken.fk_user_id !== req['user'].id