Squad Golf LogoSQUAD GOLF

Squad Golf

Simple golf groups for recurring pool creation and friendly competition.

Platform

  • Pools
  • Groups
  • Tournaments

Developer

  • API Platform
  • Documentation
  • Pricing

Support

  • Coming Soon

© 2024 Squad Golf. All rights reserved.

Authentication & Security

Learn how to securely authenticate with the Squad Golf API, manage your API keys, and understand rate limits.

API Key Management
Your API key is your unique identifier for accessing the Squad Golf API

Live Keys

For production use

sk_live_abc123...

Test Keys

For development and testing

sk_test_def456...

Tip: Test keys return realistic mock data and don't count toward your rate limits. Use them during development to avoid accidentally hitting your limits.

Manage API Keys
Authentication Methods
Choose the authentication method that works best for your application

Bearer Token (Recommended)

Recommended

Pass your API key in the Authorization header

Example
curl -H "Authorization: Bearer sk_live_abc123..."   https://api.squad.golf/api/v1/tournaments
Most secure method
Supported by all HTTP clients
Easy to rotate keys

Custom Header

Pass your API key in a custom X-API-Key header

Example
curl -H "X-API-Key: sk_live_abc123..."   https://api.squad.golf/api/v1/tournaments
Alternative to Bearer token
Some proxies prefer custom headers
Same security level
Implementation Examples
See how to implement secure authentication in your preferred language
nodejs
// Using environment variables (recommended)
const { SquadGolfClient } = require('@squad-golf/api-client');

const client = new SquadGolfClient({
  apiKey: process.env.SQUAD_GOLF_API_KEY // Load from environment
});

// Alternative: Direct HTTP with fetch
const response = await fetch('https://api.squad.golf/api/v1/tournaments', {
  headers: {
    'Authorization': `Bearer ${process.env.SQUAD_GOLF_API_KEY}`,
    'Content-Type': 'application/json'
  }
});
Rate Limits
API requests are limited based on your subscription tier
Driving Range
Free
8
requests/day
Basic tournament data
Player search
Community support
Most Popular
Front Nine
$20/month
167
requests/day
All Driving Range features
WebSocket live updates
Email support
Championship
$50/month
833
requests/day
All Front Nine features
Webhooks
Priority support
Masters
$149/month
3,333
requests/day
All Championship features
Dedicated support
Custom integrations

Rate Limiting: When you exceed your rate limit, the API will return a 429 status code. The response includes headers indicating when you can make your next request.

Security Best Practices
Follow these guidelines to keep your API keys secure

Store Keys Securely

high

Never hardcode API keys in your source code. Use environment variables or secure key management systems.

Use Environment Variables

high

Store your API key in environment variables and load them at runtime.

Rotate Keys Regularly

medium

Generate new API keys periodically and deactivate old ones.

Monitor Usage

medium

Keep track of your API usage and set up alerts for unusual activity.

Server-Side Only

high

Never expose API keys in client-side JavaScript or mobile apps.

Use HTTPS

high

Always use HTTPS when making API requests to protect your keys in transit.

Common Error Codes
Understanding authentication-related error responses
401
Unauthorized
Invalid or missing API key
403
Forbidden
API key lacks required permissions
429
Too Many Requests
Rate limit exceeded
500
Internal Server Error
Server error, try again later
Next Steps
Ready to start making authenticated requests?
Generate API KeyCreate your first API key in the dashboardAPI ReferenceExplore all available endpointsView ExamplesSee real-world implementation examples