Frequently Asked Questions

Find answers to common questions about the Discord-Twitter Developer Platform.

1. How to get authentication tokens for Discord?

Generate your Discord bot token from the Developer Portal:

GET /api/v2/oauth/authorize/step1?client_id=YOUR_CLIENT_ID

Step 1: Authorize user, Step 2: Exchange code, Step 3: Store token securely

2. What are the API rate limits?

Authentication endpoints

100 RPS

User data endpoints

150 RPS

Message moderation

50 RPS

Requests exceeding these limits will receive HTTP 429 with Retry-After header

3. How to use the SDK with Next.js?

import { DiscordSDK } from '@discord-twitter/bridge-sdk'

const sdk = new DiscordSDK({
  clientId: process.env.NEXT_PUBLIC_CLIENT_ID,
  redirectUri: window.location.origin + '/auth/callback',
  enableTwitterBridge: true
})

// Get user info
const userInfo = await sdk.users.getCurrentUser()
                    

4. How to handle error 403 Forbidden?

Common Causes:

  • • Invalid or expired scopes
  • • Missing required OAuth permissions
  • • IP whitelisting not configured
  • • Rate limit exceeded
  • • Bot not added to server (guild)

Solutions:

  • • Regenerate OAuth token
  • • Add all required scopes
  • • Whitelist API endpoint IP
  • • Implement retry logic
  • • Verify bot installation