Files
appwrite/docs/examples/1.8.x/server-dart/examples/account/create-magic-url-token.md
T
2025-12-17 15:48:49 +05:30

500 B

import 'package:dart_appwrite/dart_appwrite.dart';

Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with

Account account = Account(client);

Token result = await account.createMagicURLToken( userId: '<USER_ID>', email: 'email@example.com', url: 'https://example.com', // (optional) phrase: false, // (optional) );