Overview & Concepts
What is Visitor Mode?
Visitor mode enables anonymous public access to your community, allowing users to browse and discover content without requiring authentication. This feature is ideal for growth funnels, SEO optimization, and public content discovery while maintaining platform security and stability.Visitor Users
Purpose: Anonymous users who browse public content
Access: Read-only permissions enforced server-side
Tracking: Identified by an SDK-generated device ID
Use Case: Public content discovery, growth funnel
Access: Read-only permissions enforced server-side
Tracking: Identified by an SDK-generated device ID
Use Case: Public content discovery, growth funnel
Bot Users
Purpose: Search engine crawlers and automated indexers
Access: Read-only permissions for content indexing
Tracking: Identified by User-Agent analysis
Use Case: SEO optimization, content discoverability
Access: Read-only permissions for content indexing
Tracking: Identified by User-Agent analysis
Use Case: SEO optimization, content discoverability
How Visitor Mode Works
Visitor mode uses an SDK-generated device ID to identify anonymous users while maintaining privacy:1
Device Identification
The SDK generates or retrieves a stable device ID for the anonymous user
2
Visitor Login
The SDK logs in the user as a visitor using the device ID, with optional secure mode via authSignature
3
Server-Side Role Assignment
social.plus server assigns the “Visitor” or “Bot” role based on the request (User-Agent for bots)
4
Read-Only Access
Server-side permissions enforce read-only access, allowing content discovery without modification capabilities
Why device IDs? This approach lets social.plus distinguish anonymous visitor sessions without requiring a signed-in user account. Visitors are restricted to read-only access, protecting community integrity.
User Type Comparison
Understanding the different user types helps you design the right access patterns:- Signed-In Users
- Visitor Users
- Bot Users
- ✅ Full read/write access to all features
- ✅ Real-time event connections (MQTT)
- ✅ Push notifications
- ✅ Create posts, comments, reactions
- ✅ Join communities and follow users
Parameters
Quick Start (Visitor Mode)
Step 1: Initialize the SDK
Start by setting up the social.plus client with your API key:Step 2: Get Visitor Device ID
Generate or retrieve a unique device identifier for the visitor:The device ID is automatically generated and cached on first access. This unique identifier is used to track the visitor session.
Step 3: Login as Visitor
Authenticate as an anonymous visitor to access public content:Step 4: Login as Bot (TypeScript Only)
For search engine crawlers and automated indexers:Bot login is automatically determined by User-Agent analysis on the server. Use this method when you need explicit bot role assignment.
Step 5: Check User Type
Verify the current user type to adapt your UI accordingly:Step 6: Logout
End the visitor session:Secure Visitor Mode (Production)
For production environments, secure visitor mode adds an extra layer of authentication by requiring cryptographic signatures for visitor sessions. Once secure mode is enabled, all visitor login requests must include a valid auth signature generated by your backend server.Getting Your Visitor Secret
After visitor secure mode is enabled for your network, retrieve your visitor application secret from the Console:1
Navigate to Settings
Open your social.plus Console and go to Settings → Integrations
2
Locate Visitor Secret
Scroll to the Visitor Secure Mode Setup section (visible only after visitor secure mode is enabled)
3
Copy Secret
Create new secret and store it securely in your backend environment variables
Backend Auth Signature Generation
Your backend server must generate time-limited auth signatures using HMAC-SHA256 encryption:- Install dependencies:
- Create a
.envfile in your project root:
- Run the server:
How It Works: The signature is created by hashing the device ID and expiration timestamp with your secret key. social.plus servers verify the signature using the same secret, ensuring the request originated from your trusted backend.
Secure Visitor Login
Use auth signatures for production visitor sessions. ObtainauthSignature via the API implemented in the previous step, and provide the corresponding values to the loginAsVisitor() function.
Session Handler for Token Renewal
Implement session handlers to automatically refresh auth signatures:- iOS
- Android
- TypeScript
Understanding Visitor Permissions
Visitor and bot users have server-side enforced read-only permissions to protect community integrity:Allowed Actions ✅
- View public posts and content
- Browse public communities
- View user profiles
- View comments and replies
- View post reactions
- Access public media (images, videos)
Restricted Actions ❌
- Create posts or stories
- Comment or reply
- React to posts/comments
- Join communities
- Follow/unfollow users
- Report content or users
- Send messages
- Receive push notifications
- Real-time event connections (MQTT)
Permission Enforcement
All visitor restrictions are enforced server-side - attempting restricted actions will result in permission errors:Resource Conservation
Visitors and bots are excluded from resource-intensive features:- Real-Time Events
- Push Notifications
- User Discovery
MQTT Connection: Disabled for visitors/bots
- No real-time event subscriptions
- No live updates or notifications
- Reduces server load and connection costs
- Does not count towards CCU (Concurrent Connection Users) limits
Daily Usage Limit
Visitor and bot users share a daily read request quota. Once the quota is exhausted, all subsequent read API calls return error code400323 until the quota resets.
Quota: 100 read requests per day, shared across all API endpoints — feed, events, communities, user profiles, etc. The counter resets daily. Monthly overages are a billing concern only; the SDK never receives a monthly-limit error.
Error Code
SDK Event Subscription
The Android and TypeScript SDKs emit a visitor usage-limit event the first time error400323 is detected per session. Subsequent failures within a 2-second window are deduplicated to avoid triggering the handler on simultaneous parallel requests.
- Android
- TypeScript
The event is only emitted for
VISITOR and BOT user types. Signed-in users never receive this event.Data Management & Lifecycle
Guest User Data Cleanup
To prevent accumulation of transient visitor data, social.plus automatically cleans up inactive guest users:Automatic Cleanup Policy
Automatic Cleanup Policy
Schedule: Periodic cleanup (configurable, typically 30-60 days)Criteria: Guest users inactive for the defined periodProcess:
- Scheduled job runs automatically
- Identifies inactive guest user records
- Permanently deletes inactive guest data
- No manual intervention required
- Guest user profile records
- Visitor device ID associations
- Session history
- Any cached visitor data
Data Retention Considerations
Data Retention Considerations
Active Visitors: Continuously using visitors retain their dataPrivacy Compliance: Automatic cleanup supports GDPR/privacy regulationsAnalytics Impact: Historical analytics remain unaffectedConversion Tracking: Converted visitors (who signed up) preserve their history
Event Availability: Guest user events are available through existing webhook/event observation mechanisms configured in your social.plus console.
Implementation Best Practices
Visitor Mode Strategy
When to Use Visitor Mode ✅
When to Use Visitor Mode ✅
Recommended Scenarios:
- Public Content Discovery
- Community showcases and landing pages
- SEO-optimized public content
- Growth funnel entry points
- Social media linked content
- Conversion Optimization
- Allow browsing before signup
- Demonstrate community value
- Reduce friction in user journey
- Track engagement before conversion
- SEO & Indexing
- Enable search engine crawling
- Improve content discoverability
- Separate bot traffic from analytics
- Optimize for organic search
- Set clear upgrade prompts for interactive features
- Track visitor-to-member conversion rates
- Monitor guest traffic patterns
- Use analytics to optimize conversion flow
When to Require Authentication ❌
When to Require Authentication ❌
Require Sign-In For:
- Private/Sensitive Content
- Member-only communities
- Personal conversations
- Restricted content
- Premium features
- High-Value Interactions
- Content creation
- Community moderation
- Direct messaging
- Transaction-based features
- Compliance Requirements
- Age-restricted content
- Regulated industries
- Terms of service acceptance
- User accountability needs
Security Considerations
Production Security
Production Security
Always Use Secure Mode in Production:Why Secure Mode?
- Prevents unauthorized visitor creation
- Enables server verification of device identity
- Supports automatic token renewal
- Maintains audit trail of visitor sessions
Visitor Device ID Privacy
Visitor Device ID Privacy
Privacy-conscious approach:
- Visitor device IDs are pseudonymous SDK identifiers
- Visitor mode does not require a signed-in user profile
- Automatic cleanup of inactive visitors
- Your app remains responsible for its own privacy notice and consent requirements
- Disclose visitor tracking in privacy policy
- Provide opt-out mechanisms where required
- Use device IDs only for platform functionality
- Don’t link device IDs to external identifiers
Troubleshooting
Visitor login fails with permission error
Visitor login fails with permission error
Symptoms: Cannot login as visitor, permission denied errorsSolutions:
- Verify visitor mode is enabled - Contact support@social.plus if visitor mode has not been enabled for your network
- Check API key has visitor access permissions
- Ensure you’re using correct region endpoint
- For secure mode, verify visitor secure mode is enabled for your network
- For secure mode, verify auth signature is correctly generated
- Check auth signature hasn’t expired
Next Steps
Authentication Guide
Learn about authenticated user login and session management
User Management
Understand user profiles and member management
Community Access Control
Configure community permissions and access levels
Analytics & Reporting
Track visitor metrics and conversion analytics in the Console