updateRecovery¶
Use this endpoint to complete the user account password reset. Both the userId and secret arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the POST /account/recovery endpoint.
Please note that in order to avoid a Redirect Attack the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
Usage Example¶
extends Node
func _ready():
# You can skip setup if you have .env
Appwrite.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
Appwrite.set_project('<YOUR_PROJECT_ID>') # Your project ID
Appwrite.set_session('') # The user session to authenticate with
var result = await Appwrite.account.update_recovery(
'<USER_ID>',
'<SECRET>',
'password'
)
if result is AppwriteException:
push_error(result.message)
if result is AppwriteToken:
print(result.to_dict())