If the user is signed in through [Amplify.Auth.signIn](/lib/auth/signin), then you can retrieve the current user's ID as shown below: ```java Amplify.Auth.getCurrentUser( authUser -> String userId = authUser.getUserId(), error -> Log.e("MyAmplifyApp", "Error getting current user", error) ); ``` ```kotlin Amplify.Auth.getCurrentUser( { authUser -> val userId = authUser.userId }, { Log.e("MyAmplifyApp", "Error getting current user", it) } ) ``` ```kotlin try { val userId = Amplify.Auth.getCurrentUser().userId } catch (error: PushNotificationsException) { Log.e("MyAmplifyApp", "Error getting current user", error) } ``` ```java RxAmplify.Auth.getCurrentUser().subscribe( authUser -> String userId = authUser.getUserId(), error -> Log.e("MyAmplifyApp", "Error getting current user", error) ); ```