# How to integrate sendbird chatbot ai in angular?

**URL:** <https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835>\
**Category:** Sendbird AI Agent\
**Created:** [July 29, 2024, 9:08am UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835 "2024-07-29T09:08:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![hammouda\_wissem](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/hammouda_wissem/32/5328_2.png) [@hammouda\_wissem](https://community.sendbird.com/u/hammouda_wissem)\
**Post date:** [July 29, 2024, 9:08am UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/1 "2024-07-29T09:08:16Z")

</div>

when i add the script code in the index.html :

```auto
<body>
  <script>
    !function(w, d, s, ...args){
      var div = d.createElement('div');
      div.id = 'aichatbot';
      d.body.appendChild(div);
      w.chatbotConfig = args;
      var f = d.getElementsByTagName(s)[0],
      j = d.createElement(s);
      j.defer = true;
      j.type = 'module';
      j.src = 'https://aichatbot.sendbird.com/index.js';
      f.parentNode.insertBefore(j, f);
    }(window, document, 'script', '19E64F6C-928E-45AF-9374-ED6B01D58092', 'onboarding_bot', {
      apiHost: 'https://api-cf-eu-1.sendbird.com',
    });
    </script>
  <app-root></app-root>
</body>

```

the chatbot appear like this photo :

 ![sendbird-chatbot](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/d/d5aa782509d30ba28976d4fbd9a49102b9e8d6b5.png)

---

<div class="post-metadata">

**Author:** ![Benabdallah\_Jalel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/benabdallah_jalel/32/5330_2.png) [@Benabdallah\_Jalel](https://community.sendbird.com/u/Benabdallah_Jalel)\
**Post date:** [July 29, 2024, 7:08pm UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/2 "2024-07-29T19:08:35Z")

</div>

how fix this error because i have this some error??

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [July 30, 2024, 12:27am UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/3 "2024-07-30T00:27:08Z")

</div>

Please can you share the contents of your browser console so we can see any errors that might be there?

---

<div class="post-metadata">

**Author:** ![hammouda\_wissem](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/hammouda_wissem/32/5328_2.png) [@hammouda\_wissem](https://community.sendbird.com/u/hammouda_wissem)\
**Post date:** [July 30, 2024, 1:34am UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/4 "2024-07-30T01:34:25Z")

</div>

There is no error in the console of browser.

---

<div class="post-metadata">

**Author:** ![hammouda\_wissem](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/hammouda_wissem/32/5328_2.png) [@hammouda\_wissem](https://community.sendbird.com/u/hammouda_wissem)\
**Post date:** [July 30, 2024, 1:42am UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/5 "2024-07-30T01:42:21Z")

</div>

there is no error in the console

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jason/32/488_2.png) [@Jason](https://community.sendbird.com/u/Jason)\
**Post date:** [July 30, 2024, 2:33am UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/6 "2024-07-30T02:33:42Z")

</div>

Please can you provide your Sendbird app\_id. You can dm me it if you don’t want to leave it here. Also, one other thing, please open the console and delete and local storage relating to Sendbird, then reload.

Consider that we create a new user and group channel when the widget opens for the first time. Their details are stored in the local storage. If it possible there is a mismatch between the local storage and what is in Sendbird. Deleting the local storage for Sendbird will reset the widget to create a new user an channel.

I’m not saying it’s the solution just that it might work.

---

<div class="post-metadata">

**Author:** ![hammouda\_wissem](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/hammouda_wissem/32/5328_2.png) [@hammouda\_wissem](https://community.sendbird.com/u/hammouda_wissem)\
**Post date:** [July 30, 2024, 12:10pm UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/7 "2024-07-30T12:10:07Z")

</div>

I tried the suggested steps, but it doesn’t seem to work. Specifically, I deleted the local storage related to Sendbird in my application and reloaded, but the issue is still  
persists.

 ![sendbird-chatbot](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/d/d5aa782509d30ba28976d4fbd9a49102b9e8d6b5.png)

---

<div class="post-metadata">

**Author:** ![Benabdallah\_Jalel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/benabdallah_jalel/32/5330_2.png) [@Benabdallah\_Jalel](https://community.sendbird.com/u/Benabdallah_Jalel)\
**Post date:** [July 30, 2024, 5:18pm UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/8 "2024-07-30T17:18:40Z")

</div>

can you give me the URL for post method to send a message in ai chatbot ??

---

<div class="post-metadata">

**Author:** ![hammouda\_wissem](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/hammouda_wissem/32/5328_2.png) [@hammouda\_wissem](https://community.sendbird.com/u/hammouda_wissem)\
**Post date:** [July 31, 2024, 1:03am UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/9 "2024-07-31T01:03:52Z")

</div>

Hi,  
Can you provide me please the URL for the endpoint that uses the Sendbird chatbot AI to respond to questions or return prompt responses like ChatGPT?

---

<div class="post-metadata">

**Author:** ![Airen\_Kang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/airen_kang/32/1831_2.png) [@Airen\_Kang](https://community.sendbird.com/u/Airen_Kang)\
**Post date:** [July 31, 2024, 3:07am UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/10 "2024-07-31T03:07:06Z")

</div>

Hi @hammouda_wissem could you please check the domain allowed list? The two URLs below treated differently, so it would be good to confirm whether a trailing slash is added or not.

- [https://my-website.com](https://my-website.com)
- [https://my-website.com/](https://my-website.com/)

---

<div class="post-metadata">

**Author:** ![hammouda\_wissem](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/hammouda_wissem/32/5328_2.png) [@hammouda\_wissem](https://community.sendbird.com/u/hammouda_wissem)\
**Post date:** [July 31, 2024, 9:20am UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/11 "2024-07-31T09:20:21Z")

</div>

My domaine restrict is : [http://localhost](http://localhost)  
Because i try to integrate it in angular.

---

<div class="post-metadata">

**Author:** ![Airen\_Kang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/airen_kang/32/1831_2.png) [@Airen\_Kang](https://community.sendbird.com/u/Airen_Kang)\
**Post date:** [August 2, 2024, 12:29am UTC](https://community.sendbird.com/t/how-to-integrate-sendbird-chatbot-ai-in-angular/9835/12 "2024-08-02T00:29:33Z")

</div>

Since localhost is not a domain, could you try adding the port when adding it to the allowed list?  
`http://localhost:0000`
