← Back to Blog

curl Authentication: Bearer, Basic, OAuth & API Keys

How to authenticate with curl: Bearer tokens, Basic auth, API keys, OAuth 2.0, and client certificates.

Authentication Methods

# Bearer token (JWT)\ncurl -H 'Authorization: Bearer eyJhbGci...' https://api.example.com\n\n# Basic auth\ncurl -u username:password https://api.example.com\n\n# API key in header\ncurl -H 'X-API-Key: your-key-here' https://api.example.com\n\n# API key in query param\ncurl 'https://api.example.com?api_key=your-key'

Try It Free

Use our free online tool — 100% client-side, no data leaves your browser.

Open JWT Decoder

Related Tools & Articles