Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
'Freshchat getUser()' always returns empty 'FreshchatUser'

I am using react-native-freshchat-sdk. After initiating freshchat with freshchatConfig, I have called Frestchat.setUser(user) and Freshchat.identifyUser(externalId, restoreId). Then I am calling Freshchat.getUser(callback). But in the callback, I am not getting user details. I have atteched my code below:

let freshchatUser = new FreshchatUser();
freshchatUser = {
  ...freshchatUser,
  firstName: user_name,
  email: email_address,
  phoneCountryCode: PHONE_CODE,
  phone: phone_number,
};
Freshchat.setUser(freshchatUser);
Freshchat.identifyUser(user_uid, chat_id || null, () => { }); // user_uid as externalId and chat_id as restoreId
Freshchat.getUser((user) => {
  const restoreId = user.restoreId;
  if (!restoreId && !chat_id) {
    Freshchat.getFreshchatUserId((data) => {
      const users = { ...userInfo, chat_id: data };
      setLSItems('userData', JSON.stringify(users));
      // BE API Call to update restore id
    });
  }
});
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!