# Get null token nextAuth

**URL:** <https://forum.codewithmosh.com/t/get-null-token-nextauth/30201>\
**Category:** Next.js\
**Created:** [November 28, 2024, 12:44pm UTC](https://forum.codewithmosh.com/t/get-null-token-nextauth/30201 "2024-11-28T12:44:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shahad](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@Shahad](https://forum.codewithmosh.com/u/Shahad)\
**Post date:** [November 28, 2024, 12:44pm UTC](https://forum.codewithmosh.com/t/get-null-token-nextauth/30201/1 "2024-11-28T12:44:33Z")

</div>

I created route.ts file inside app\>auth\>token

import { getToken } from “next-auth/jwt”;  
import { NextRequest, NextResponse } from “next/server”;

export async function GET(request: NextRequest) {  
const token = await getToken({ req: request });

```
console.log(token)
return NextResponse.json(token);

```

}

In brwoser after login i tried to see token by go to the right path localhost:3001/api/auth/token but i get null what that mean
