title: How to integrate intercom live chat feature into an Android app
body: <p>I'm try to integrate intercom live chat feature into my app, the live chart platform shows as below but could not load the chart features.</p>
  <p><a href="https://i.stack.imgur.com/2cWuN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2cWuN.jpg" alt="enter image description here" /></a></p>
  <p>Also, I get this error in the logcat:</p>
  <p><code>E/Intercom: Api call failed: {“type”:“error.list”,“request_id”:“0009rulecss011cdfe60&quot;,“errors”:[{“code”:“token_not_found”,“message”:“Unauthorized”}]}</code></p>
  <p>Here are my implementations so far:</p>
  <pre><code>class App : MultiDexApplication() {
  
      override fun onCreate() {
          super.onCreate()
  
          initIntercom()
      }
  
      private fun initIntercom(){
          Intercom.initialize(this, getString(R.string.intercom_api_key), getString(R.string.intercom_app_id))
      }
  }
  </code></pre>
  <p>The fragment where I want to open the chat</p>
  <pre><code>class IntercomLiveChatFragment : Fragment() {
  
      private val USER_ID = &quot;123456&quot;
      private val CLIENT_ID = &quot;client-id&quot;
      private val SECRET_ID = &quot;secret-id&quot;
  
      //----------------------------------------------------------------------------------------------
      // If you use Identity Verification you will need to include HMAC
      // We suggest taking these values from your app. You may need to change USER_ID above to match your HMAC
      //----------------------------------------------------------------------------------------------
      private val YOUR_HMAC = &quot;&quot;
  
      override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                                savedInstanceState: Bundle?): View? {
          return inflater.inflate(R.layout.intercom_live_chat_fragment, container, false)
      }
  
      override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
          super.onViewCreated(view, savedInstanceState)
          //Enable a user wit Intercom
          Intercom.client().setLauncherVisibility(Intercom.Visibility.VISIBLE)
          //Register a user with Intercom
          Intercom.client().registerIdentifiedUser(Registration.create().withUserId(SECRET_ID))
   
          Intercom.client().updateUser(userAttributes)
          Intercom.client().displayMessenger()
      }
  
  }
  </code></pre>
  <p>I passed CLIENT_ID as well for the <code>withUserId(CLIENT_ID)</code> but still getting the same error. I am yet to know what exactly is the UserId add if that is what is causing the error. Please help me out.</p>