Register/Login User

Use this API to register or login user to application

Request JSON Parameter Description:

JSON Parameter

Required

Default

Description

userId

Yes

User id for registration/login

email

No

null

User's email address

password

No

null

User account password

displayName

No

User's display name which you want to show to other users

applicationId

Yes

Your Applozic App ID configured in dashboard

deviceType

Yes

0 for web,1 for Android, 4 for iOS

authenticationTypeId

No

1

1 for password verification from Applozic server and 0 for access token verification from client server

registrationId

No

Device FCM or APNS registration id for push notification

pushNotificationFormat

No

0 for Standard (FCM/APNS) and 1 for PhoneGap

userTypeId

No

This parameter can be used to distinguish different type of users within application. Example: For an educational app, userTypeId = 1 means Student,
userTypeId = 2 means Teachers.

contactNumber

No

User's contact number

unreadCountType

No

0

0 = do not show unread badge count on app icon in iOS devices
1 = show the unread badge count on app icon in iOS devices

appModuleName

No

pass module name if created in Applozic dashboard.

📘

Note:

No header required for registration API.

Response JSON Parameter Description:

Response Parameter

Description

message

One of the following is returned.

REGISTERED : New user register with APNS/FCM push notification token.

REGISTERED.WITHOUTREGISTRATIONID : New user registration without APNS/FCM push notification token.

UPDATED : Old user logged-in

userKey

User key for the given user id

deviceKey

User's device key

lastSyncTime

Time in milliseconds when user's device last synced with the server

contactNumber

User's contact number, received only if passed

currentTimeStamp

Time in milliseconds when the response is returned from server

📘

Note:

deviceKey need to be stored and sent in request header in each API call.

The following JSON will come in response in case of no userId or applicationId passed:

{
  "message": "INVALID_PARAMETER",
  "currentTimeStamp": 1454328359265
}
Language
Click Try It! to start a request and see the response here!