I can’t get the agent published on my site as i can’t get the integration and Enable the Unauthenticated API. How can I do so with the new console ? I can’t get any useful information from the google assistants (they all point to old documentation which no longer works )
-------------
(These were given on the assistant and no longer valid)
To run your agent on website.com, you must first authorize the domain in the Google Cloud console to prevent other websites from using your bot, and then paste the integration code into your index.html.
Since billing is active, follow these exact steps to authorize the domain and get your code:
1. Authorize website.com in the Console
-
Open the Vertex AI Agent Builder console .
-
Select your agent and click the Integrations icon
in the left sidebar. -
Click Manage on the Dialogflow Messenger card.
-
In the configuration window:
-
Environment: Select your published environment (or “Draft”).
-
Unauthenticated API: Ensure this is toggled On.
-
Authorized Domains: This is the critical part. Type
website.cominto the field and click Add. -
Restrict Domain Access: Make sure this checkbox is checked if you want to ensure it only runs on your site.
-
-
Click Enable the Unauthenticated API (or Save).
2. Copy the Code to your index.html
After saving, the console will show you a code snippet. Copy it and paste it into your index.html file. Below is a complete template showing exactly where it goes:
Generated code may be subject to license restrictions not shown here. Use code with care. Learn more
3. Verify the Deployment
-
Host your site: The agent will not work if you simply open
index.htmlas a local file (e.g.,C:\Desktop\index.html). You must upload it to your web server so it is accessed viahttps://website.com. -
Clear Cache: If you updated the authorized domains but it still isn’t working, clear your browser cache or open the site in an Incognito window.
-
Check for “403 Forbidden”: If the bubble appears but says “Something went wrong,” press
F12on your keyboard, go to the Console tab, and check if there is a domain authorization error.
Crucial: Make sure you replace PASTE-YOUR-AGENT-ID-HERE with the actual ID found in your Integration settings window.
Do you have your Agent ID handy, or would you like me to help you find it in the console?