# Integratly.AI WebChat Enpower your website with AI Agent in 1 click! ## Connect with our support if you need any assistance https://t.me/VSmelov ## Configuration ### To receive from us projectId: str - the unique name of your project. apiUrl: str - the URL path to the backend. userToken: str - internal security token adminToken: str - token to use OMNI chat and pause/unpause ### To be configured by you divId - id of the div where you want to add the webchat, if empty, the webchat will be created in the right-bottom corner ### add this tag to your HTML ```html= <script src="https://cdn.jsdelivr.net/gh/vsmelov/chatwidget-assets@main/static/integratlychat.js" data-project-id="blablabla" data-api-url="https://bla.bla:777" data-user-token="..." data-div-id="some-div" // or remove ></script> ``` ## Easy examples ### AIChat Iframe as a new element on the WebSite https://throbbing-art-3812.on.fleek.co/webwidget.html ![](https://hackmd.io/_uploads/HkvOT5e-a.png) ### AIChat embedded to the existant div on the website You can configure the style and position of the webchat on your page how you want. https://throbbing-art-3812.on.fleek.co/webwidget-div.html ![](https://hackmd.io/_uploads/rJ0Fp9xZp.png) ## Admin api ### Pause AI AI Bot will not reply in this chat anymore ```bash= curl -X POST ${API_URL}/set_pause_ai \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${ADMIN_TOKEN}" \ -d `{"chat_id": "${CHAT_ID}", "value": true}`` ``` ### Unpause AI Bot will reply in the chat again ```bash= curl -X POST https://${API_URL}/set_pause_ai \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${ADMIN_TOKEN}" \ -d `{"chat_id": "${CHAT_ID}", "value": false}` ``` ### Send message to the chat ```bash= curl -X POST https://${API_URL}/omni/send \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${ADMIN_TOKEN}" \ -d `{"chat_id": "${CHAT_ID}", "channel": "webchat", "text": "from omni"}` ```