Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/appwrite/src/services/account.ts>Account#createPhoneToken

[READ-ONLY] Official Appwrite Deno SDK 🦕
Latest
method Account.prototype.createPhoneToken
import { Account } from "https://deno.land/x/appwrite@11.0.0/src/services/account.ts";

Create phone token

Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the POST /v1/account/sessions/token endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.

A user is limited to 10 active sessions at a time by default. Learn more about session limits.

Parameters

userId: string
phone: string

Returns

Promise<Models.Token>