Overview
Social account integration enables enhanced loyalty features like:- Social media verification rules
- Cross-platform engagement tracking
- Enhanced user profiles
- Automated social media tasks
Supported Social Platforms
Snag supports connecting the following social platforms:- Twitter/X - Follow accounts, post tweets, verify bio content
- Discord - Join servers, verify roles, track messages
- Telegram - Join channels, verify messages
- Epic Games - Verify game ownership and achievements
- Steam - Verify game library and wishlist
- Google - Verify email address
- TikTok - Verify TikTok account
- Email - Verify email address
Method 1: Snag OAuth Flow
This method lets Snag handle the entire OAuth process, providing a seamless user experience.How It Works
- Generate OAuth URL: Call Snag’s API to get an authentication URL
- Redirect User: Send the user to the OAuth URL
- User Authorization: User authorizes the connection on the social platform
- Callback Handling: Snag redirects back to your application
- Verification: Confirm the connection was successful
Implementation
Step 1: Generate OAuth URL
Step 2: Redirect User
Step 3: Handle Callback
Client-Side Integration
Method 2: Direct Social Handle Passing
If you control the OAuth flow in your application, you can pass social handles directly to Snag using the metadata endpoint.Implementation
Example: Custom OAuth Implementation
Platform-Specific Endpoints
Twitter/X
Discord
Telegram
Custom OAuth Applications
Snag allows you to use your own OAuth applications for Twitter, Discord, Epic Games, and Steam integrations. This enables you to maintain your brand identity throughout the authentication flow.Required Redirect URLs
Add these redirect URLs to your OAuth application:https://snag-render.com/api/twitter/auth/callbackhttps://snag-render.com/api/discord/auth/callbackhttps://snag-render.com/api/epic/auth/callbackhttps://snag-render.com/api/steam/auth/callback
Error Handling
Common Issues
OAuth Flow Errors
OAuth Flow Errors
- Invalid redirect URI: Ensure your redirect URI matches exactly
- Expired authorization: OAuth codes expire quickly, handle them promptly
- User cancellation: Handle cases where users cancel the authorization
Error Handling Example
Best Practices
Integration with Loyalty Rules
Once social accounts are connected, they can be used in loyalty rules:- Twitter Follow: Verify users follow specific accounts
- Discord Role: Check if users have specific server roles
- Telegram Join: Verify users joined specific channels
- Social Verification: Use social accounts as proof of identity
For detailed information on social account management, see our Managing
Social Accounts guide.
Next Steps
Now that you can connect social accounts, you’re ready to:Create Loyalty Rules
Start building loyalty programs with social media integration.