Anonymous Operations

Anonymous Operations

An anonymous operation is one that does not require a security token to use. In general, the only anonymous operations allowed in the Arrayent Cloud relate to registering new Customer Accounts.

activateUser

Activates a new Customer Account that has just been registered via registerUser within the last hour.

Preconditions
  • The call to registerUser was made within the last hour. If it has been more than an hour, then the activation code will have expired and is therefore invalid.
Usage

See the Self Registration Workflow overview in the Web Service API Developer’s Guide. Upon successful completion of this operation, the Arrayent Cloud will automatically send a “Welcome” email to the user. You can modify the content of this email using addEmailTemplate and setting the notificationStage parameter to WELCOME.

Parameters
Parameter Name Data Type Description
activationCode string The activation code. When the web service client previously calledregisterUser it provided an email address as one of the arguments of theregisterUser request. The Arrayent Cloud sent the activation code to this email address.
Response
Element Name Data Type Description
retCode Integer A return code of 0 indicates that the new Customer Account has been successfully activated.All other values should be treated as failure.
Examples
https://example.arrayent.com:8081/zdk/services/zamapi/activateUser?
activationCode=CalaiBCU

A return code of “0” indicates that the Customer Account has been successfully activated.

<ns1:activateUserResponse xmlns:ns1="http://arrayent.com/zamapi/">
 <retCode>0</retCode>
</ns1:activateUserResponse>

An error code of “339” means that the activation code is invalid.

<ns1:requestFault xmlns:ns1="http://arrayent.com/zamapi/">
 <errorCode>339</errorCode>
 <errorMsg>Invalid activation code.</errorMsg>
</ns1:requestFault>

registerUser

Sends an anonymous request to the Arrayent Cloud to create a new Customer Account.

Limitations
  • An email address is required for creating an account.
  • The username cannot be modified.
  • The email address cannot be modified.
  • An email address can only be associated to one Customer Account.
Usage

See the Self Registration Workflow overview in the Web Service API Developer’s Guide. Upon registration, the Arrayent Cloud will send out a confirmation email to the new user. To select the language of the email:

  1. Call addEmailTemplate and upload an email template for the desired language. This configuration only needs to occur once per desired language.
  2. When calling registerUser, set the Accept-Language HTTP header to the same language locale that was specified inaddEmailTemplate.

Upon successfull completion of this operation, the Arrayent Cloud will automatically send a “Activation Code” email to the user. You can modify the content of this email using addEmailTemplate and setting the notificationStage parameter to SELF_REGISTER. Username requirements: usernames should be between 6 and 100 characters in length. Letters, numbers, period and underscore may be used. Usernames are case-sensitive. E.g. the usernames FORD.PREFECT, ford.prefect, and Ford.Prefect are all unique and valid. Passwords should be selected by the user. If initial passwords are system-generated then the user must be instructed to change their password upon initial login. Passwords should always be encrypted before being sent to the Arrayent Cloud. Password requirements: Minimum 8 characters, maximum 60 characters (inclusive). Password must contain characters from three of the following four groups: lowercase letters, uppercase letters, numbers, and non-alphanumeric characters in the set (#!$&@). At least 6 of those characters may occur only once in the password.

Parameters
Parameter Name Data Type Description
applicationId Integer The Application ID under which the new Customer Account is created.
email string The email address which the activation code is sent to.
fullname string Optional. First and last name of the user.
username string The username for the new Customer Account. 6 characters minimum, 100 characters maximum (inclusive).
password string The password for the new Customer Account. Password requirements are listed above in Usage section.
Response
Element Name Data Type Description
retCode Integer A return code of 0 indicates success. In this context success means that the Arrayent Cloud received the request, generated the activation code, and sent the activation code to the email address specified in the request.All other values should be treated as failure.
Examples
https://example.arrayent.com:8081/zdk/services/zamapi/registerUser?
username=johnsmith&password=Pass1234&email=john%40email.com&applicationId=1234

A return code of “0” indicates that the Arrayent Cloud successfully received the request, generated the activation code, and sent the email to the specified email address.

<ns1:registerUserResponse xmlns:ns1="http://arrayent.com/zamapi/">
 <retCode>0</retCode>
</ns1:registerUserResponse>

A “125” error code indicates that you are attempting to access an Application ID that is not valid on this Arrayent Cloud environment.

<ns1:requestFault xmlns:ns1="http://arrayent.com/zamapi/">
 <errorCode>125</errorCode>
 <errorMsg>Access denied to this appID.</errorMsg>
</ns1:requestFault>

A “206” error code indicates that there has already been a request to create this Customer Account within the last hour.

<ns1:requestFault xmlns:ns1="http://arrayent.com/zamapi/">
 <errorCode>206</errorCode>
 <errorMsg>Duplicated username [johnsmith]</errorMsg>
</ns1:requestFault>

A “329” error code indicates that the password is less than 8 characters or more than 60 characters long (inclusive).

<ns1:requestFault xmlns:ns1="http://arrayent.com/zamapi/">
 <errorCode>329</errorCode>
 <errorMsg>Invalid password format</errorMsg>
</ns1:requestFault>

A “177” error code indicates that the password is less than 8 characters or more than 60 characters long (inclusive).

<ns1:requestFault xmlns:ns1="http://arrayent.com/zamapi/">
 <errorCode>177</errorCode>
 <errorMsg>Invalid username.</errorMsg>
</ns1:requestFault>

requestPasswordRecoveryCode

Sends a password recovery code to the specified email address.

Limitations
  • This operation only works for Customer Accounts that were initially created via registerUser. If your application usedcreateNewUser to create the Customer Account this operation will not work!
Usage

Upon successfull completion of this operation, the Arrayent Cloud will automatically send a “Reset Password” email to the user. This email will contain a recovery code. You can modify the content of this email using addEmailTemplate and setting thenotificationStage parameter to RESET_PASSWORD.

Parameters
Parameter Name Data Type Description
email string The email address that will receive the recovery code.
Response
Element Name Data Type Description
retCode Integer A return code of 0 indicates that the Arrayent Cloud has successfully sent the recovery code to the email address.All other values should be treated as failure.
Examples
https://example.arrayent.com:8081/zdk/services/zamapi/
requestPasswordRecoveryCode?email=john%40email.com

A return code of “0” indicates that the Arrayent Cloud has successfully sent the recovery code to the specified email address.

<ns1:requestPasswordRecoveryCode xmlns:ns1="http://arrayent.com/zamapi/">
 <retCode>0</retCode>
</ns1:requestPasswordRecoveryCode>

Error code “111” means that the provided email address is not associated with any Customer Account.

<ns1:requestFault xmlns:ns1="http://arrayent.com/zamapi/">
 <errorCode>111</errorCode>
 <errorMsg>User does not exist.</errorMsg>
</ns1:requestFault>

updateUserPassword

Changes the password of a Customer Account.

Preconditions
  • Your application has previously called requestPasswordRecoveryCode. If your application has not calledrequestPasswordRecoveryCode, then the user will not have received a recovery code in their email, and therefore will not be able to successfully complete updateUserPassword.
  • The recovery code was sent to the user’s email within the last hour. After one hour the recovery code expires.
Limitations
  • This operation only works for Customer Accounts that were initially created via registerUser. If your application usedcreateNewUser to create the Customer Account this operation will not work!
Parameters
Parameter Name Data Type Description
recoveryCode string The recovery code that the Arrayent Cloud sent to the email address associated with the Customer Account.
username string The username of the Customer Account.
password string The new password for the Customer Account. Minimum 8 characters, maximum 60 characters (inclusive).
Response
Element Name Data Type Description
retCode Integer A return code of 0 indicates that the password for this Customer Account has successfully been updated.All other values should be treated as failure.
Examples
https://example.arrayent.com:8081/zdk/services/zamapi/updateUserPassword?
recoveryCode=1XEZoNx2&username=johnsmith&password=f21eMZ7i

A return code of “0” indicates that the password for the Customer Account has been successfully updated.

<ns1:updateUserPassword xmlns:ns1="http://arrayent.com/zamapi/">
 <retCode>0</retCode>
</ns1:updateUserPassword>

Common Errors

Missing request argument

The following error code indicates that a required argument is missing from your request:

<faultstring>
 Required element ELEMENT defined in the schema can not be
 found in the request
</faultstring>

Where ELEMENT is the name of the argument that is missing in your request.

Web Service API Return Codes

The table below contains a reference on the various return codes that the Arrayent Cloud returns in response to your web service requests.

Code Message Description
1 Arrayent core server error
2 Invalid device name.
3 Invalid device password.
4 Device name registration has expired.
5 Device does not exist.
6 Device is not available. The Arrayent Cloud cannot contact the device. This usually means that the device is offline.
7 Sender is not in the device friend list.
8 Device name already used.
9 Customer is not a trial customer.
10 Invalid login session.
11 Invalid key code.
12 Invalid question number.
13 Invalid answer.
14 Arrayent core server not available.
15 Registration code already used.
16 Arrayent Core server permission denied.
101 Invalid login name or password. The username or password does not match the Arrayent Cloud’s database record. Check both for typos. You will also see this message if you attempt to login with a user account that does not exist (you can create the account withcreateNewUser).
102 Login name does not exist.
103 Invalid Customer Attribute name.
104 Invalid Device Attribute name.
105 Invalid Device Type Name.
106 Invalid security token. The security token has probably expired due to inactivity. Security tokens expire after 15 minutes of inactivity.
107 Permission denied.
108 Name already used.
109 Device does not exist.
110 Device already associated with another customer. The device has already been added to another account via addDeviceToUser.
111 Customer does not exist.
112 Device Type in use, cannot delete.
113 Trigger does not exist. The Trigger ID that you provided does not match any alerts in the Arrayent Cloud database.
114 Device Type does not exist.
115 Database consistency error.
116 Invalid Customer ID.
117 Name is required.
118 Database internal error.
119 System Account access required to use this operation. You need to login to the Arrayent Cloud via systemLogin with a set of valid System Account credentials to perform this operation.
120 Name already in use, cannot delete.
122 Invalid page number.
123 Invalid page size.
124 Invalid user type.
125 Invalid App ID.
126 No devices associated to this Device Type.
127 Invalid data length. The size of the value is greater than the allowed maximum size.
129 Phone is already associated to the current account.
130 The API operation is missing a required parameter. Check the reference of the operation that you are using to make sure that you are not missing any parameters.
131 The mobile platform is not supported. Valid options for the operatingSystemparameter are ios and android (case-sensitive).
132 The phone does not exist in the system. The Phone ID that you provided does not exist.
134 Message timeout. The Arrayent Cloud could not send the message to the device. This is usually caused by a weak wireless or Internet connection.
135 Connection lost.
136 Unable to create device attribute.
137 Target devices must have the same device type.
138 Target devices must follow this format: <device ID>,<attribute name>:<attribute value>
139 Target devices cannot have the same device ID and attribute name as the trigger definition.
140 Invalid sleep mode defined.
141 Device attribute does exist in system.
142 Trigger action is invalid or deprecated. The value that you supplied for theaction parameter is invalid.
144 Password required.
146 Invalid data type. The value does not match the specified data type.
147 Invalid URL.
201 Sent message status not available.
202 Request timeout.
203 Internal connection error.
204 API key is invalid.
205 Invalid device ID.
317 URI syntax is invalid.
318 Invalid URI format.
319 The connection with the provided URL couldn’t be established.
320 Error downloading remote file. Please check available space and disk permissions.
321 Error calculating file checksum.
347 Invalid Certificate. password/hexCertificate invalid.
350 The application configuration does not exist for <name> value of parameter mobileAppName mobileAppName value name submitted does not exist.
1000 Interface not supported.
1001 Internal error.