REST.Backend.EMSApi.TEMSClientAPI.SignupUser

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SignupUser(const AUserName, APassword: string;  const AUserFields: TJSONObject; out ALogin: TLogin);

C++

void __fastcall SignupUser(const System::UnicodeString AUserName, const System::UnicodeString APassword, System::Json::TJSONObject* const AUserFields, /* out */ TLogin &ALogin);

Properties

Type Visibility Source Unit Parent
procedure
function
public
REST.Backend.EMSApi.pas
REST.Backend.EMSApi.hpp
REST.Backend.EMSApi TEMSClientAPI

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.
  • AUserFields 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.
  • ALogin is an instance of TLogin that SignupUser fills with the authentication data that the EMS server sends.

Exceptions

Exception Message Description

EEMSClientAPIError

MasterSecret required

Authentication is TAuthentication.MasterSecret and ConnectionInfo.MasterSecret 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

Authentication is TAuthentication.Session and you did not log in or the session authentication token that you provided to Login is an empty string.

See Also