Create User
You should create a user in your MirrorFly application to initiate conversations. A user is identified by its unique user identifier, and additionally have a changeable nickname, profile image, and so on. Users are at the core of all conversations. MirrorFly applications are made up of users who can chat in directly to other users or Group. With the Create User API, it is possible to create a user.
info
{api-base-url}
can be obtained from the MirrorFly console.
#
HTTP request#
Request ParamsParam | DataType | Required | Description |
---|---|---|---|
deviceType | String | Yes | Device type where the user is creating. Accepted values (web/ios/android). |
licenseKey | String | Yes | Your license key. |
userIdentifier | String | Yes | Unique user identifier. Max of 191 chars allowed. |
deviceOsVersion | String | No | Device os version. |
deviceToken | String | No | Device token to receive the push notification for android/ios devices. |
voipDeviceToken | String | No | Voip device token to receive the call related push notification for the ios devices. |
mode | Int | No | Mode to denote the ios sandbox/production mode to receive the push notifications. 0 - production, 1 - sandbox/debug |
nickname | String | No | Nickname of the user. Max of 30 chars allowed. |
mobileNumber | String | No | Mobile number of the user. Max of 15 chars allowed. |
String | No | Email ID of the user, Which accepts special characters like !#$%&+ | |
profileUrl | String | No | If you already having the profile image url, then you can use this param to store the data. Max of 2048 chars allowed. |
profileFile | File | No | If you need to upload the image, then you can use this param to upload the image and retrieve the profile url which will be access via the Mirrorfly SDK’s and API’s only. Accepted files are png, jpeg and jpg. |
metadataKey1 | String | No | Metadata key. |
metadataValue1 | String | No | Metadata key1 value. |
metadataKey2 | String | No | Metadata key. |
metadataValue2 | String | No | Metadata key2 value. |
metadataKey3 | String | No | Metadata key. |
metadataValue3 | String | No | Metadata key3 value. |
#
ResponsesIf successful, this action returns a user resource in the response body.
#
ErrorIn the case of an error, an error object like below is returned. When the token passed in Headers is not given or expired
In the case of a Bad Request, an error message is returned