Skip to content

elements_user

Francisco Dias edited this page Aug 20, 2026 · 1 revision

User

The User endpoints.

Functions

This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.



Back To Top

elements_complete_reset

Validates the reset token and sets the new password. All existing sessions are invalidated. Returns 400 if the token is invalid or expired.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_complete_reset(_body=undefined, _callback=undefined)
Argument Type Description
_body ElementsCompletePasswordResetRequest The body to be included in the http request.
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data Any
_request ElementsRequest


Back To Top

elements_create_user

Supplying the user object, this will update the user with the new information supplied in the body of the request. Optionally, the user's password may be provided in the User object.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_create_user(_body=undefined, _callback=undefined)
Argument Type Description
_body ElementsUserCreateRequest The body to be included in the http request.
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsUserCreateResponse or Undefined
_request ElementsRequest


Back To Top

elements_deactivate_user

Deletes and permanently removes the user from the server. The server may keep some metadata as necessary to avoid data inconsistency. However, the user has been deleted from the client standpoint and will not be accessible through any of the existing APIs.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_deactivate_user(_name, _callback=undefined)
Argument Type Description
_name String
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data Any
_request ElementsRequest


Back To Top

elements_get_current_user

A special endpoint used to get the current user for the request. The current user is typically associated with the session but may be derived any other way. This is essentially an alias for using GET /user/myUserId

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_get_current_user(_callback=undefined)
Argument Type Description
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsUser or Undefined
_request ElementsRequest


Back To Top

elements_get_user

Gets a specific user by name, email, or unique user ID.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_get_user(_name, _callback=undefined)
Argument Type Description
_name String
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsUser or Undefined
_request ElementsRequest


Back To Top

elements_get_users

Searches all users in the system and returning the metadata for all matches against the given search filter.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_get_users(_offset=undefined, _count=undefined, _search=undefined, _callback=undefined)
Argument Type Description
_offset Real
_count Real
_search String
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsPaginationUser or Undefined
_request ElementsRequest


Back To Top

elements_link_email_password

Links email+password credentials to the currently authenticated user. The email must first be verified via POST /user/me/email/verify.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_link_email_password(_body=undefined, _callback=undefined)
Argument Type Description
_body ElementsLinkEmailPasswordRequest The body to be included in the http request.
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsUser or Undefined
_request ElementsRequest


Back To Top

elements_link_oauth2

Links an external OAuth2 identity to the currently authenticated user. Requires an active user session. Returns the updated session information.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_link_oauth2(_body=undefined, _callback=undefined)
Argument Type Description
_body ElementsOAuth2SessionRequest The body to be included in the http request.
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsSessionCreation or Undefined
_request ElementsRequest


Back To Top

elements_link_oidc

Links an external OIDC identity to the currently authenticated user. Requires an active user session. Returns the updated session information.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_link_oidc(_body=undefined, _callback=undefined)
Argument Type Description
_body ElementsOidcSessionRequest The body to be included in the http request.
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsSessionCreation or Undefined
_request ElementsRequest


Back To Top

elements_link_username_password

Links username+password credentials to the currently authenticated user. If the account has no username yet, the supplied username is claimed. If a username is already set it must match; name changes must be done explicitly.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_link_username_password(_body=undefined, _callback=undefined)
Argument Type Description
_body ElementsLinkUsernamePasswordRequest The body to be included in the http request.
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsUser or Undefined
_request ElementsRequest


Back To Top

elements_request_reset

Sends a password reset link to the given email address if an account exists. Always returns 200 to prevent user enumeration.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_request_reset(_body=undefined, _callback=undefined)
Argument Type Description
_body ElementsPasswordResetRequest The body to be included in the http request.
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data Any
_request ElementsRequest


Back To Top

elements_request_verification

Sends a verification link to the given email address associated with the current user.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_request_verification(_body=undefined, _callback=undefined)
Argument Type Description
_body ElementsEmailVerificationRequest The body to be included in the http request.
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsUserUid or Undefined
_request ElementsRequest


Back To Top

elements_update_user

Supplying the user object, this will update the user with the new information supplied in the body of the request. Optionally, the user's password may be provided in the User object.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_update_user(_user_id, _body=undefined, _callback=undefined)
Argument Type Description
_user_id String
_body ElementsUserUpdateRequest The body to be included in the http request.
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsUser or Undefined
_request ElementsRequest


Back To Top

elements_update_user_password

Supplying the UserUpdatePasswordRequest, this will attempt to update the user's password only if they supply the correct existing password.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Callback.


Syntax:

elements_update_user_password(_user_id, _body=undefined, _callback=undefined)
Argument Type Description
_user_id String
_body ElementsUserUpdatePasswordRequest The body to be included in the http request.
_callback Function Callback with signature (status, data, request).

Returns:

N/A


Triggers:

Callback

Key Type Description
_status Real
_data ElementsSessionCreation or Undefined
_request ElementsRequest


Clone this wiki locally