mirror of
https://github.com/appwrite/appwrite
synced 2026-05-13 20:18:50 +00:00
553 B
553 B
import { Client, Users, MessagingProviderType } from "@appwrite.io/console";
const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>'); // Your project ID
const users = new Users(client);
const result = await users.createTarget( '<USER_ID>', // userId '<TARGET_ID>', // targetId MessagingProviderType.Email, // providerType '', // identifier '<PROVIDER_ID>', // providerId (optional) '' // name (optional) );
console.log(result);