langflow-ai / langflow-embedded-chat

The Langflow Embedded Chat is a powerful web component that enables seamless communication with the Langflow
76 stars 30 forks source link

403 Forbidden using Chat #4

Closed damhack closed 1 year ago

damhack commented 1 year ago

At the point that the WebComponent for basic HTML performs a post back to the server process endpoint, a 403 is thrown complaining about lack of API Key.

I am passing the key as per the docs, in my case via tweaks, e.g.:

<langflow-chat
...
  host_url="https://<mySite>"
  tweaks='{"api_key": "<myAPIKey>"}'
></langflow-chat>

However, the API Key isn't then passed in a header within the request.

What am I doing wrong?

damhack commented 1 year ago

Resolved: It's the Widget bundle.min.js loaded from the CDN that is causing the 403.

I built the project and moved the JS library local to my Langflow assets folder to load the script from the URL /assets/bundle.min.js

It now works fine using the api_key property.