# React Native Chat Notification

**URL:** <https://community.sendbird.com/t/react-native-chat-notification/5237>\
**Category:** Miscellaneous\
**Tags:** react-native\
**Created:** [August 2, 2022, 10:36am UTC](https://community.sendbird.com/t/react-native-chat-notification/5237 "2022-08-02T10:36:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiran](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/kiran/32/3493_2.png) [@kiran](https://community.sendbird.com/u/kiran)\
**Post date:** [August 2, 2022, 10:36am UTC](https://community.sendbird.com/t/react-native-chat-notification/5237/1 "2022-08-02T10:36:57Z")

</div>

I am trying to register token to sendbird but the response is “pending” status

```auto
const sb = SendBird.getInstance();

if (Platform.OS === 'ios') {
    const token = await messaging().getAPNSToken();
    try {
        const response = await sb.registerAPNSPushTokenForCurrentUser(token); // response is "Pending"
        // Do something in response to a successful registration.
    } catch (error) {
        // Handle error.
    }
} else {
    const token = await messaging().getToken();
    try {
        const response = await sb.registerGCMPushTokenForCurrentUser(token);
        // Do something in response to a successful registration.
    } catch (error) {
        // Handle error.
    }
}

```

---

<div class="post-metadata">

**Author:** ![kiran](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/kiran/32/3493_2.png) [@kiran](https://community.sendbird.com/u/kiran)\
**Post date:** [August 2, 2022, 10:45am UTC](https://community.sendbird.com/t/react-native-chat-notification/5237/2 "2022-08-02T10:45:56Z")

</div>

(post deleted by author)
