REST.Backend.EMSServices.TEMSLoginAPI.SignupUser

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SignupUser(const AUserName, APassword: string;  const AUserData: TJSONObject; out ACreatedObject: TBackendEntityValue);

C++

void __fastcall SignupUser(const System::UnicodeString AUserName, const System::UnicodeString APassword, System::Json::TJSONObject* const AUserData, /* out */ Rest::Backend::Metatypes::TBackendEntityValue &ACreatedObject);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
REST.Backend.EMSServices.pas
REST.Backend.EMSServices.hpp
REST.Backend.EMSServices TEMSLoginAPI

Description

Registers a user account on the EMS server with the specified username and password, and logs into the EMS server to obtains authentication data that you can use in future requests.

SignupUser receives the following parameters:

  • AUserName is the username to register.
  • APassword is the password to register for that username.
  • AUserData is an optional JSON object containing key-value pairs of user data to send to the EMS server along with the specified username and password. If you do not want to provide additional user data, use a nil value as parameter.
  • ACreatedObject is an instance of TBackendEntityValue that SignupUser fills with the authentication data that the EMS server sends.

Exceptions

Exception Message Description

EEMSClientAPIError

MasterSecret required

The type of authentication is TAuthentication.MasterSecret and the MasterSecret property of the connection information of the underlying EMS backend service is an empty string.

Session token expected

The response from the EMS server does not contain a session token.

The response from the EMS server must be a JSON object of signup data that contains a key-value pair with the value of TJSONNames.SessionToken as key.

Session token required

The type of authentication is TAuthentication.Session you did not log in.

See Also