<BlockSwitcher>
<Block name="Java">

```java
Amplify.Auth.getCurrentUser(
   user.userId,
   error -> // failed to fetch user
);
```
</Block>
<Block name="Kotlin">

```kotlin
Amplify.Auth.getCurrentUser({ user ->
    user.userId,{
    // failed to get user
})
```

</Block>
<Block name="RxJava">

```java
RxAmplify.Auth.getCurrentUser().subscribe(
        result -> result.userId,
        error -> // failed to get user
 );
```

</Block>
</BlockSwitcher>
