Users API
The Users service allows you to manage your project users. Use this service to search, block, and view your users' info, current sessions, and latest activity logs. You can also use the Users service to edit your users' preferences and personal info.
Users API vs Account API
While the Users API is integrated from the server-side and operates in an admin scope with access to all your project users, the Account API operates in the scope of the current logged in user and usually using a client-side integration.
Some of the Account API methods are available from the server SDK when you authenticate with JWT. This allows you to perform server-side actions on behalf of your project user.
Create User
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.write" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. |
required | string | User email. | |
password | required | string | User password. Must be at least 8 chars. |
name | optional | string | User name. Max length: 128 chars. |
HTTP Response
Status Code | Content Type | Payload |
201 Created | application/json | User Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.create('[USER_ID]', 'email@example.com', 'password'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.create('[USER_ID]', 'email@example.com', 'password'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->create('[USER_ID]', 'email@example.com', 'password');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.create('[USER_ID]', 'email@example.com', 'password')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.create(user_id: '[USER_ID]', email: 'email@example.com', password: 'password') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.create( userId: '[USER_ID]', email: 'email@example.com', password: 'password', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.create( userId = "[USER_ID]", email = "email@example.com", password = "password", ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.create( userId = "[USER_ID]", email = "email@example.com", password = "password", new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let user = try await users.create( userId: "[USER_ID]", email: "email@example.com", password: "password" ) print(String(describing: user) }
List Users
Get a list of all the project's users. You can use the query params to filter your results.
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.read" permission scope.
HTTP Request
Name | Type | Description | |
search | optional | string | Search term to filter your list results. Max length: 256 chars. |
limit | optional | integer | Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request. |
offset | optional | integer | Offset value. The default value is 0. Use this param to manage pagination. learn more about pagination |
cursor | optional | string | ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. learn more about pagination |
cursorDirection | optional | string | Direction of the cursor. |
orderType | optional | string | Order result by ASC or DESC order. |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | Users List Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.list(); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.list(); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->list();
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.list()
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.list() puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.list( ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.list( ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.list( new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let userList = try await users.list() print(String(describing: userList) }
Get User
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.read" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | User Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.get('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.get('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->get('[USER_ID]');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.get('[USER_ID]')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.get(user_id: '[USER_ID]') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.get( userId: '[USER_ID]', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.get( userId = "[USER_ID]" ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.get( userId = "[USER_ID]" new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let user = try await users.get( userId: "[USER_ID]" ) print(String(describing: user) }
Get User Preferences
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.read" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | Preferences Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.getPrefs('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.getPrefs('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->getPrefs('[USER_ID]');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.get_prefs('[USER_ID]')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.get_prefs(user_id: '[USER_ID]') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.getPrefs( userId: '[USER_ID]', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.getPrefs( userId = "[USER_ID]" ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.getPrefs( userId = "[USER_ID]" new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let preferences = try await users.getPrefs( userId: "[USER_ID]" ) print(String(describing: preferences) }
Get User Sessions
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.read" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | Sessions List Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.getSessions('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.getSessions('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->getSessions('[USER_ID]');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.get_sessions('[USER_ID]')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.get_sessions(user_id: '[USER_ID]') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.getSessions( userId: '[USER_ID]', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.getSessions( userId = "[USER_ID]" ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.getSessions( userId = "[USER_ID]" new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let sessionList = try await users.getSessions( userId: "[USER_ID]" ) print(String(describing: sessionList) }
Get User Memberships
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.read" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | Memberships List Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.getMemberships('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.getMemberships('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->getMemberships('[USER_ID]');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.get_memberships('[USER_ID]')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.get_memberships(user_id: '[USER_ID]') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.getMemberships( userId: '[USER_ID]', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.getMemberships( userId = "[USER_ID]" ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.getMemberships( userId = "[USER_ID]" new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let membershipList = try await users.getMemberships( userId: "[USER_ID]" ) print(String(describing: membershipList) }
Get User Logs
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.read" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
limit | optional | integer | Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request. |
offset | optional | integer | Offset value. The default value is 0. Use this value to manage pagination. learn more about pagination |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | Logs List Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.getLogs('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.getLogs('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->getLogs('[USER_ID]');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.get_logs('[USER_ID]')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.get_logs(user_id: '[USER_ID]') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.getLogs( userId: '[USER_ID]', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.getLogs( userId = "[USER_ID]", ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.getLogs( userId = "[USER_ID]", new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let logList = try await users.getLogs( userId: "[USER_ID]" ) print(String(describing: logList) }
Update User Status
Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.write" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
status | required | boolean | User Status. To activate the user pass |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | User Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updateStatus('[USER_ID]', false); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updateStatus('[USER_ID]', false); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->updateStatus('[USER_ID]', false);
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.update_status('[USER_ID]', False)
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.update_status(user_id: '[USER_ID]', status: false) puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.updateStatus( userId: '[USER_ID]', status: false, ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.updateStatus( userId = "[USER_ID]", status = false ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.updateStatus( userId = "[USER_ID]", status = false new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let user = try await users.updateStatus( userId: "[USER_ID]", status: xfalse ) print(String(describing: user) }
Update Email Verification
Update the user email verification status by its unique ID.
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.write" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
emailVerification | required | boolean | User email verification status. |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | User Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updateVerification('[USER_ID]', false); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updateVerification('[USER_ID]', false); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->updateVerification('[USER_ID]', false);
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.update_verification('[USER_ID]', False)
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.update_verification(user_id: '[USER_ID]', email_verification: false) puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.updateVerification( userId: '[USER_ID]', emailVerification: false, ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.updateVerification( userId = "[USER_ID]", emailVerification = false ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.updateVerification( userId = "[USER_ID]", emailVerification = false new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let user = try await users.updateVerification( userId: "[USER_ID]", emailVerification: xfalse ) print(String(describing: user) }
Update Name
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.write" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
name | required | string | User name. Max length: 128 chars. |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | User Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updateName('[USER_ID]', '[NAME]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updateName('[USER_ID]', '[NAME]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->updateName('[USER_ID]', '[NAME]');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.update_name('[USER_ID]', '[NAME]')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.update_name(user_id: '[USER_ID]', name: '[NAME]') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.updateName( userId: '[USER_ID]', name: '[NAME]', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.updateName( userId = "[USER_ID]", name = "[NAME]" ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.updateName( userId = "[USER_ID]", name = "[NAME]" new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let user = try await users.updateName( userId: "[USER_ID]", name: "[NAME]" ) print(String(describing: user) }
Update Password
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.write" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
password | required | string | New user password. Must be at least 8 chars. |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | User Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updatePassword('[USER_ID]', 'password'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updatePassword('[USER_ID]', 'password'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->updatePassword('[USER_ID]', 'password');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.update_password('[USER_ID]', 'password')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.update_password(user_id: '[USER_ID]', password: 'password') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.updatePassword( userId: '[USER_ID]', password: 'password', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.updatePassword( userId = "[USER_ID]", password = "password" ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.updatePassword( userId = "[USER_ID]", password = "password" new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let user = try await users.updatePassword( userId: "[USER_ID]", password: "password" ) print(String(describing: user) }
Update Email
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.write" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
required | string | User email. |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | User Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updateEmail('[USER_ID]', 'email@example.com'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updateEmail('[USER_ID]', 'email@example.com'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->updateEmail('[USER_ID]', 'email@example.com');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.update_email('[USER_ID]', 'email@example.com')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.update_email(user_id: '[USER_ID]', email: 'email@example.com') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.updateEmail( userId: '[USER_ID]', email: 'email@example.com', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.updateEmail( userId = "[USER_ID]", email = "email@example.com" ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.updateEmail( userId = "[USER_ID]", email = "email@example.com" new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let user = try await users.updateEmail( userId: "[USER_ID]", email: "email@example.com" ) print(String(describing: user) }
Update User Preferences
Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.write" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
prefs | required | object | Prefs key-value JSON object. |
HTTP Response
Status Code | Content Type | Payload |
200 OK | application/json | Preferences Object |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updatePrefs('[USER_ID]', {}); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.updatePrefs('[USER_ID]', {}); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->updatePrefs('[USER_ID]', []);
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.update_prefs('[USER_ID]', {})
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.update_prefs(user_id: '[USER_ID]', prefs: {}) puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.updatePrefs( userId: '[USER_ID]', prefs: {}, ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.updatePrefs( userId = "[USER_ID]", prefs = mapOf( "a" to "b" ) ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.updatePrefs( userId = "[USER_ID]", prefs = mapOf( "a" to "b" ) new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let preferences = try await users.updatePrefs( userId: "[USER_ID]", prefs: ) print(String(describing: preferences) }
Delete User Session
Delete a user sessions by its unique ID.
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.write" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
sessionId | required | string | Session ID. |
HTTP Response
Status Code | Content Type | Payload |
204 No Content | - | - |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.deleteSession('[USER_ID]', '[SESSION_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->deleteSession('[USER_ID]', '[SESSION_ID]');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.delete_session('[USER_ID]', '[SESSION_ID]')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.delete_session(user_id: '[USER_ID]', session_id: '[SESSION_ID]') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.deleteSession( userId: '[USER_ID]', sessionId: '[SESSION_ID]', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.deleteSession( userId = "[USER_ID]", sessionId = "[SESSION_ID]" ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.deleteSession( userId = "[USER_ID]", sessionId = "[SESSION_ID]" new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let result = try await users.deleteSession( userId: "[USER_ID]", sessionId: "[SESSION_ID]" ) print(String(describing: result) }
Delete User Sessions
Delete all user's sessions by using the user's unique ID.
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.write" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
HTTP Response
Status Code | Content Type | Payload |
204 No Content | - | - |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.deleteSessions('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.deleteSessions('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->deleteSessions('[USER_ID]');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.delete_sessions('[USER_ID]')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.delete_sessions(user_id: '[USER_ID]') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.deleteSessions( userId: '[USER_ID]', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.deleteSessions( userId = "[USER_ID]" ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.deleteSessions( userId = "[USER_ID]" new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let result = try await users.deleteSessions( userId: "[USER_ID]" ) print(String(describing: result) }
Delete User
Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the updateStatus endpoint instead.
Authentication
To access this route, init your SDK with your project unique ID and API Key secret token. Make sure your API Key is granted with access to the "users.write" permission scope.
HTTP Request
Name | Type | Description | |
userId | required | string | User ID. |
HTTP Response
Status Code | Content Type | Payload |
204 No Content | - | - |
-
const sdk = require('node-appwrite'); // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.delete('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
import * as sdk from "https://deno.land/x/appwrite/mod.ts"; // Init SDK let client = new sdk.Client(); let users = new sdk.Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; let promise = users.delete('[USER_ID]'); promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });
-
<?php use Appwrite\Client; use Appwrite\Services\Users; $client = new Client(); $client ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint ->setProject('5df5acd0d48c2') // Your project ID ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $users = new Users($client); $result = $users->delete('[USER_ID]');
-
from appwrite.client import Client from appwrite.services.users import Users client = Client() (client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key ) users = Users(client) result = users.delete('[USER_ID]')
-
require 'appwrite' client = Appwrite::Client.new client .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key users = Appwrite::Users.new(client) response = users.delete(user_id: '[USER_ID]') puts response.inspect
-
import 'package:dart_appwrite/dart_appwrite.dart'; void main() { // Init SDK Client client = Client(); Users users = Users(client); client .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; Future result = users.delete( userId: '[USER_ID]', ); result .then((response) { print(response); }).catchError((error) { print(error.response); }); }
-
import io.appwrite.Client import io.appwrite.services.Users suspend fun main() { val client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key val users = Users(client) val response = users.delete( userId = "[USER_ID]" ) val json = response.body?.string() }
-
import io.appwrite.Client import io.appwrite.services.Users public void main() { Client client = Client(context) .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Users users = new Users(client); users.delete( userId = "[USER_ID]" new Continuation<Response>() { @NotNull @Override public CoroutineContext getContext() { return EmptyCoroutineContext.INSTANCE; } @Override public void resumeWith(@NotNull Object o) { String json = ""; try { if (o instanceof Result.Failure) { Result.Failure failure = (Result.Failure) o; throw failure.exception; } else { Response response = (Response) o; } } catch (Throwable th) { Log.e("ERROR", th.toString()); } } } ); }
-
import Appwrite func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key let users = Users(client) let result = try await users.delete( userId: "[USER_ID]" ) print(String(describing: result) }