# About React native calls handler

**URL:** <https://community.sendbird.com/t/about-react-native-calls-handler/8018>\
**Category:** Miscellaneous\
**Tags:** sendbird-call\
**Created:** [August 9, 2023, 5:39am UTC](https://community.sendbird.com/t/about-react-native-calls-handler/8018 "2023-08-09T05:39:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vidhi\_Tomar](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/vidhi_tomar/32/4114_2.png) [@Vidhi\_Tomar](https://community.sendbird.com/u/Vidhi_Tomar)\
**Post date:** [August 9, 2023, 5:39am UTC](https://community.sendbird.com/t/about-react-native-calls-handler/8018/1 "2023-08-09T05:39:19Z")

</div>

```auto
export const callsPermission = async () => {
  const CALL_PERMISSIONS = Platform.select({
    android: [
      PERMISSIONS.ANDROID.CAMERA,
      PERMISSIONS.ANDROID.RECORD_AUDIO,
      PERMISSIONS.ANDROID.BLUETOOTH_CONNECT,
    ],
    ios: [PERMISSIONS.IOS.CAMERA, PERMISSIONS.IOS.MICROPHONE],
    default: [],
  });

  const result = await Permissions.requestMultiple(CALL_PERMISSIONS);

  if(result){
    const initialize = SendbirdCalls.initialize("2CF82AB3-0DBD-482E-8468-D8A062591D18");
    console.log(initialize , ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%')
    if(initialize){
   const authenti = SendbirdCalls.authenticate({
        userId: 'demo',
        accessToken: 'xyz',
    })
        .then((user) => {
            // The user has been authenticated successfully.
            console.log(user , 'connectedd &&&&&&&&&&&&&&&&&&&&&&&&&')
        })
        .catch((error) => {
            // Error.
            console.log(error , 'got error in calls fucntion')
        });
    }
    else{
      console.log('nhi huaaaaaaaaaa')
    }
   
  }
};

```

I am calling this function but when i console

const authenti = SendbirdCalls.authenticate({  
userId: ‘demo’,  
accessToken: ‘xyz’,  
})  
.then((user) =\> {  
// The user has been authenticated successfully.  
console.log(user , ‘connectedd &&&&&&&&&&&&&&&&&&&&&&&&&’)  
})  
.catch((error) =\> {  
// Error.  
console.log(error , ‘got error in calls fucntion’)  
});  
}

i got the error here and the error is

LOG [Error: The http request failed. (Unable to resolve host “[api-2cf82ab3-0dbd-482e-8468-d8a062591d18.calls.sendbird.com](http://api-2cf82ab3-0dbd-482e-8468-d8a062591d18.calls.sendbird.com)”: No address associated with hostname)] got error in calls fucntion

can u help me out for this?
