# How to change the default API path for \`/me\` (and who called it)

**URL:** <https://community.auth0.com/t/how-to-change-the-default-api-path-for-me-and-who-called-it/139277>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, nextjs-auth0\
**Created:** [July 19, 2024, 2:42am UTC](https://community.auth0.com/t/how-to-change-the-default-api-path-for-me-and-who-called-it/139277 "2024-07-19T02:42:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lzh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lzh/32/72638_2.png) [@lzh](https://community.auth0.com/u/lzh)\
**Post date:** [July 19, 2024, 2:42am UTC](https://community.auth0.com/t/how-to-change-the-default-api-path-for-me-and-who-called-it/139277/1 "2024-07-19T02:42:07Z")

</div>

Hi,

I’m trying a simple authentication with a different route path, in nextjs

my layout.ts

```auto
import { UserProvider } from "@auth0/nextjs-auth0/client";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";

const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
  title: "Create Next App",
  description: "Generated by create next app",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <UserProvider>
        <body className={inter.className}>{children}</body>
      </UserProvider>
    </html>
  );
}

```

page.ts

```auto
import { getSession } from "@auth0/nextjs-auth0";

export default async function Home() {
  const { user } = await getSession();
  console.log(user);

  return (
    <main className="flex min-h-screen flex-col items-center justify-between p-24">
      <a href="/auth/api/login">Login</a>
      {user && (
        <div>
          <img src={user.picture} alt={user.name} />
          <h2>{user.name}</h2>
          <p>{user.email}</p>
        </div>
      )}
    </main>
  );
}

```

.env.local

```auto
AUTH0_SECRET=
AUTH0_BASE_URL='http://localhost:3000'
AUTH0_ISSUER_BASE_URL=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=''
AUTH0_CALLBACK='/auth/api/callback'

```

so, instead use default `/api/auth/...` im using `/auth/api/...`. everything is working fine. except that when I’ loading the page, there’s some calling to the default me route and I’m not sure where it is coming from

 ![image](https://global.discourse-cdn.com/auth0/original/3X/8/0/809c3409fc20692785f849658347bbb5a3b04fe5.png)

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [July 19, 2024, 6:02pm UTC](https://community.auth0.com/t/how-to-change-the-default-api-path-for-me-and-who-called-it/139277/2 "2024-07-19T18:02:56Z")

</div>

Hi @lzh

Welcome to the Auth0 Community!

Thank you for posting your question. I’m not a Next.js expert, but I’ve done some research and found a similar issue in other thread → [Http://localhost:3000/api/auth/me returns 404 in Console - #8 by wisenickel5](https://community.auth0.com/t/http-localhost-3000-api-auth-me-returns-404-in-console/82831/8), which points to the code snippet from the NextJS Auth0 [readme.md](https://github.com/auth0/nextjs-auth0#base-path-and-internationalized-routing). Let me know if this solves your issue.

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 2, 2024, 6:03pm UTC](https://community.auth0.com/t/how-to-change-the-default-api-path-for-me-and-who-called-it/139277/4 "2024-08-02T18:03:33Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
