<BlockSwitcher>
<Block name="Java">

```java
Amplify.Auth.fetchUserAttributes(
    attributes -> Log.i("AuthDemo", "User attributes = " + attributes.toString()),
    error -> Log.e("AuthDemo", "Failed to fetch user attributes.", error)
);
```

</Block>
<Block name="Kotlin - Callbacks">

```kotlin
Amplify.Auth.fetchUserAttributes(
    { Log.i("AuthDemo", "User attributes = $attributes") },
    { Log.e("AuthDemo", "Failed to fetch user attributes", it) }
)
```

</Block>
<Block name="Kotlin - Coroutines">

```kotlin
try {
    val attributes = Amplify.Auth.fetchUserAttributes()
    Log.i("AuthDemo", "User attributes = $attributes")
} catch (error: AuthException) {
    Log.e("AuthDemo", "Failed to fetch user attributes", error)
}
```

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

```java
RxAmplify.Auth.fetchUserAttributes()
    .doOnSubscribe(() -> Log.i("AuthDemo", "Attributes:"))
    .flatMapObservable(Observable::fromIterable)
    .subscribe(
        eachAttribute -> Log.i("AuthDemo", eachAttribute.toString()),
        error -> Log.e("AuthDemo", "Failed to fetch attributes.", error)
    );
```

</Block>
</BlockSwitcher>
