Bubble Integration
Integrate Gately with your Bubble application to add powerful user authentication, management, and engagement features without writing code.No-Code Setup
Configure Gately directly in Bubble’s visual editor
API Integration
Use Bubble’s API connector for advanced features
Quick Start
Step 1: Add Gately to Your Bubble App
- Install the Plugin (if available) or use custom code
- Configure API Settings in Bubble’s API connector
- Set up Authentication workflows
Step 2: Configure API Connector
In your Bubble editor:- Go to Plugins → API Connector
- Add a new API called “Gately”
- Configure the base URL:
https://api.usegately.com - Add your API key in headers
Step 3: Create API Calls
User Authentication
Create a new API call for user login:- Name:
Login User - Method:
POST - Endpoint:
/auth/login - Body type:
JSON
User Registration
Create a new API call for user registration:- Name:
Register User - Method:
POST - Endpoint:
/auth/register - Body type:
JSON
Workflows
Login Workflow
- Trigger: Button click on login form
- Action: API Connector - Login User
- Parameters:
- email: Input Email’s value
- password: Input Password’s value
- Success Action: Navigate to dashboard
- Error Action: Show error message
Registration Workflow
- Trigger: Button click on registration form
- Action: API Connector - Register User
- Parameters:
- email: Input Email’s value
- password: Input Password’s value
- name: Input Name’s value
- Success Action: Navigate to welcome page
- Error Action: Show validation errors
Data Management
User Data Storage
Store user information in Bubble’s database:-
Create User Data Type:
- gately_id (text)
- email (text)
- name (text)
- subscription_plan (text)
-
Sync with Gately:
- Use webhooks to keep data in sync
- Update user records when changes occur
Privacy Settings
Configure privacy rules:- User Data: Only viewable by the user themselves
- Admin Data: Only viewable by admin users
- Public Data: Configure based on your app’s needs
Advanced Features
Webhooks
Set up webhooks to receive real-time updates:- Configure Endpoint: In your Bubble app, create an API workflow
- Add Webhook URL: In Gately dashboard, add your Bubble webhook URL
- Handle Events: Process user events, subscription changes, etc.
Custom Fields
Add custom user fields:Troubleshooting
Common Issues
API calls failing
API calls failing
- Check your API key is correct
- Verify the endpoint URLs
- Ensure headers are properly configured
- Check Bubble’s server logs for errors
User data not syncing
User data not syncing
- Verify webhook endpoints are accessible
- Check webhook payload format
- Ensure database privacy rules allow updates
- Test webhook delivery in Gately dashboard
Authentication not working
Authentication not working
- Verify API connector configuration
- Check user credentials are being passed correctly
- Ensure proper error handling in workflows
- Test API calls in Bubble’s API connector debugger
Debug Mode
Enable debug mode in your Bubble workflows:- Add Custom Events to track API responses
- Use Browser Console to view detailed errors
- Check Server Logs for backend issues
- Test with Step-by-step debugger
Best Practices
- Error Handling: Always implement proper error handling for API calls
- Loading States: Show loading indicators during API operations
- Data Validation: Validate user input before sending to Gately
- Security: Never expose API keys in client-side code
- Performance: Cache user data locally when possible
Example Implementation
Here’s a complete example of a login form in Bubble:Elements
- Input Email (type: email)
- Input Password (type: password)
- Button Login (type: button)
- Text Error (type: text, initially hidden)
Workflow
When Button Login is clicked:- API Connector - Login User
- email: Input Email’s value
- password: Input Password’s value
- When Success:
- Set state: current_user to API response
- Navigate to: dashboard page
- When Error:
- Show: Text Error
- Set text: API response error message
Next Steps
- User Management - Manage user profiles and permissions
- Authentication - Advanced authentication features
- API Reference - Complete API documentation
- Best Practices - Security and performance guidelines