Developers
Developer Guide
Technical documentation for integrating Goldilocks
Welcome to the Goldilocks Developer Guide. This section covers technical integration and advanced customization options for the widget.
Who This Is For
This documentation is for:
- Web developers integrating the widget
- Technical admins configuring advanced features
Integration Options
Widget (Recommended)
The simplest integration - add our JavaScript widget to your website:
<script
src="https://api.goldilocks.chat/goldilocks.js"
data-key="your-api-key"
async
></script>Full widget integration guide →
JavaScript API
Control the widget programmatically:
// Open widget
gl_chat('open');
// Send message
gl_chat('send', 'Hello');
// Set contact context
gl_chat('identify', { id: 'cust_123', page: 'checkout' });Quick Start
1. Get Your API Key
- Go to Settings > Account
- Find the API Keys section
- Copy your API key (click to reveal, then copy)
2. Add the Widget
Add to your HTML before </body>:
<script
src="https://api.goldilocks.chat/goldilocks.js"
data-key="YOUR_API_KEY"
async
></script>3. Test
Visit your site and click the chat bubble.
Documentation
| Topic | Description |
|---|---|
| Widget Integration | Basic and advanced widget setup |
| Widget Options | Configuration and JavaScript API |
| Contact Tracking | Identify contacts for personalized support |
Security
API Keys
Your API key is designed for client-side use:
- Domain restricted (when enabled)
- Limited to widget operations
- Safe to include in frontend code
Domain Restrictions
When domain restrictions are enabled, your widget only loads on allowed domains. Configure allowed domains in Settings > Account (or Widget page where embed code is generated).
Support
Developer Support
For integration help:
- Email: support@goldilocks.chat
- Documentation search
- In-app support chat
Bug Reports
Report issues:
- Include reproduction steps
- Note browser/environment
- Attach console errors if any