Back
[SOLVED]How to get ID from Node server SDK to create unique ID , everytime I create a Document.
- 0
- Databases
- Web

I am writing a function, and I want to generate an unique ID to create a document, How to import ID from appwrite in Node Server SDK?
TL;DR
Solution:
To generate a unique ID every time you create a document using the Node Server SDK for Appwrite, you can use the `createDocument` function along with the `generateUUID` method provided by the SDK. Here's how you can do it:
1. Import the required modules:
```javascript
const { Client, Database } = require('appwrite');
```
2. Create a new instance of the `Client` and `Database` classes:
```javascript
const client = new Client();
const database = new Database(client);
```
3. Use the `generateUUID` method from the SDK to generate a unique
How to get ID from Node server SDK to create unique ID , everytime I create a Document.


Yes, Thanks sir 🙂

[SOLVED]How to get ID from Node server SDK to create unique ID , everytime I create a Document.
Recommended threads
- I am facing this error: type 'Null' is ...
When attempting to fetch areas from the area collection, the application throws an error: "type 'Null' is not a subtype of type 'int.'" This issue originates in...
- Adding custom domain to Appwrite project
My app is hosted on Vercel on domain todo.velleb.com. On PC, the OAuth logins like GitHub, Discord and Google work and create the account and log in. On mobile ...
- #support
<#1072905050399191082> any help on that?
