diff --git a/docs/users/deleting-users.mdx b/docs/users/deleting-users.mdx index 677a155044..f7c0018e0b 100644 --- a/docs/users/deleting-users.mdx +++ b/docs/users/deleting-users.mdx @@ -20,14 +20,14 @@ To delete users using the Clerk API, you can use the [`deleteUser()`](/docs/refe ```ts {{ filename: 'app/api/delete-user/route.ts' }} - import { auth, clerkClient } from '@clerk/nextjs/server' + import { clerkClient } from '@clerk/nextjs/server' import { NextResponse } from 'next/server' export async function DELETE() { - const { userId } = auth() + const userId = 'user_123' try { - await clerkClient.users.deleteUser(userId) + await clerkClient().users.deleteUser(userId) return NextResponse.json({ message: 'User deleted' }) } catch (error) { console.log(error) @@ -56,8 +56,8 @@ To delete users using the Clerk API, you can use the [`deleteUser()`](/docs/refe - ```bash {{ filename: 'curl.sh' }} - curl -XDELETE -H 'Authorization: CLERK_SECRET_KEY' 'https://api.clerk.com/v1/users/{user_id}' + ```bash {{ filename: 'terminal' }} + curl 'https://api.clerk.com/v1/users/{user_id}' -X DELETE -H 'Authorization:Bearer {{secret}}' -H 'Content-Type:application/json' ```