Back

Need help with SDK

  • 0
  • Users
Pradip Chaudhary
21 Apr, 2023, 12:30

I was creating an API using nextjs Can I use sdk for USER API of appwrite in next js because I don't think we can use the node-js sdk for the same.

TL;DR
User needs help with using the SDK for the Users API in Next.js. Solution: Use the server-side Node SDK and put API key in `.env.local` file. Next.js documentation link provided for loading environment variables.
Binyamin
21 Apr, 2023, 12:35

To access the Users API you would have to use the server side - node sdk.

You'll just need to make sure that you put your API key in you .env.local file.

https://nextjs.org/docs/basic-features/environment-variables#loading-environment-variables

Binyamin
21 Apr, 2023, 12:35

Doing so will make sure that the key is not exposed to the end user

Pradip Chaudhary
21 Apr, 2023, 12:58

okay thanks for the info

joeyouss
21 Apr, 2023, 15:04

Hi @Pradip Chaudhary , in case you need help with examples/source code: https://github.com/appwrite/awesome-appwrite

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