In my app I don’t have any backend which will store the UserId, is there any way to retrieve the UserId from the amity console itself?
Hello @IMKalpataru Are you referring to these UserID? They’re already available on your console. Please help explain a bit more if these are not what you’re looking for.
hi @SocialPlus_Support, I understand Admin can get it from the console. is there any API that will help to get the UserID form console for the mobile/user?
Ex - Suppose a user forgets his userID, how can he retrieve the userID?
In this case, you would use userID as username ? and then retrieve username if the user forgot, which is similar case to when a user forgot password? Is this the use case you would like to achieve?
Yes, correct. I am using the userID as the username.
private fun registerDevice(userId: String, displayname: String? = "") {
AmityCoreClient.login(userId)
.apply {
if(!displayname.isNullOrEmpty()) {
displayName(displayname)
}
}
.build()
.submit()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnComplete {
registerForPushNotifications()
val intent = Intent(this, HomePageActivity::class.java)
startActivity(intent)
}
.doOnError {
findViewById<View>(android.R.id.content).showSnackBar("Could not register user " + handleErrors(
throwable = it.logThrowable()))
}
.untilLifecycleEnd(this)
.subscribe()
}
In case the user forgets his userID/userName, how can he retrieve his userId?
@IMKalpataru After double checked with the team, there isn’t a method/function to achieve this at the moment, we would recommend you to implement the authentication logic on your end.
Thank you!! for confirmation.