API Integration Guide

Complete guide to integrating with our APIs

Overview

This guide provides comprehensive documentation for integrating with our GitHub and Discord API services. Our APIs allow you to authenticate users via OAuth2 and fetch data from their connected accounts.

Authentication

We use OAuth 2.0 for authentication. Users can connect their GitHub or Discord accounts through our secure OAuth flow.

Supported Providers

  • GitHub - Access repositories, issues, and user data
  • Discord - Access server and user information

API Endpoints

GET /api/github/repos

Returns list of repositories for authenticated user

curl -H "Authorization: Bearer TOKEN" /api/github/repos

GET /api/github/issues

Returns issues from user repositories

curl -H "Authorization: Bearer TOKEN" /api/github/issues

GET /api/github/commits

Returns recent commits across all user repositories

curl -H "Authorization: Bearer TOKEN" /api/github/commits

Environment Variables

VariableDescription
GITHUB_CLIENT_IDYour GitHub OAuth App client ID
GITHUB_CLIENT_SECRETYour GitHub OAuth App client secret
DISCORD_CLIENT_IDYour Discord OAuth2 client ID
DISCORD_CLIENT_SECRETYour Discord OAuth2 client secret

Rate Limits

Our API inherits rate limits from the OAuth providers. GitHub allows up to 5,000 requests per hour for authenticated users. Discord has its own rate limiting based on endpoint types.