Skip to content
Init is coming / May 19 - 23
Back

Custom domain not working properly

  • 1
  • Web
  • Cloud
aron-yogurt
12 May, 2025, 09:27

I am using custom domain for my appwrite cloud and I am trying to get JWT token but i am getting this error `API Route: Error verifying JWT or getting user: TypeError: fetch failed at async GET (src/app/api/calendar/route.js:228:21) 226 | let appwriteUser; 227 | try {

228 | appwriteUser = await userAccount.get(); | ^ 229 | } catch (e) { 230 | console.error("API Route: Error verifying JWT or getting user:", e); 231 | return NextResponse.json( { [cause]: [Error: unable to verify the first certificate] { code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' } } GET /api/calendar?timeMin=2025-04-30T18:30:00.000Z&timeMax=2025-05-30T18:30:00.000Z 401 in 130ms API Route: Error verifying JWT or getting user: TypeError: fetch failed at async GET (src/app/api/calendar/route.js:228:21) 226 | let appwriteUser; 227 | try { 228 | appwriteUser = await userAccount.get(); | ^ 229 | } catch (e) { 230 | console.error("API Route: Error verifying JWT or getting user:", e); 231 | return NextResponse.json( { [cause]: [Error: unable to verify the first certificate] { code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' } }`

TL;DR
Developers are experiencing issues with a custom domain when trying to retrieve a JWT token for their appwrite cloud. An error related to verifying the JWT or getting the user is occurring due to a fetch failure and an error with verifying the first certificate. Further troubleshooting is needed to resolve this issue.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more