# getAttributes

Returns the maps of attributes set in the registration.

## Syntax

```javascript
MCReactModule.getAttributes() ⇒ Promise.<Object.<string, string>>
```

## Returns

- `Promise.<Object.<string, string>>` - A promise to the key-value map of attributes set in the registration.

## Example

```javascript
import { MCReactModule } from "react-native-marketingcloudsdk";

const getDeviceAttributes = async () => {
  try {
    const attributes = await MCReactModule.getAttributes();
    console.log("Device attributes:", attributes);
    Object.entries(attributes).forEach(([key, value]) => {
      console.log(`${key}: ${value}`);
    });
  } catch (error) {
    console.error("Error getting attributes:", error);
  }
};
```

## See Also

- [setAttribute() Method](/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/react_setAttribute.md)
- [clearAttribute() Method](/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/react_clearAttribute.md)
- [Android SDK Reference](https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/javadocs/MarketingCloudSdk/8.0/-marketing%20-cloud%20-s-d-k/com.salesforce.marketingcloud.registration/-registration-manager/get-attributes.html)
- *SDK Reference for iOS*: [attributes() Method](/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/marketingcloudsdk.md#attributes)
