--- title: "Authentication" source: "https://palt.ohmyteam.cc/authentication" --- # Authentication The BambooHR API supports two authentication methods: **Basic Authentication** and **OAuth 2.0**. ## Basic Authentication Most straightforward method. Use HTTP Basic Auth: - **Username**: Your BambooHR company subdomain (e.g., `acme`). - **Password**: Your API key from **Account Settings > API Access**. ### Example Header ``` Authorization: Basic ``` ```bash curl -u "acme:your-api-key-here" "https://acme.bamboohr.com/api/v1/datasets" ``` ## OAuth 2.0 For finer-grained access with scopes. Required scopes vary by endpoint (e.g., `company_file.write` for file uploads, `report` for datasets, `webhooks` for webhooks). 1. Register your OAuth application in BambooHR. 2. Request an access token with the appropriate scopes. 3. Include in Authorization header: `Bearer `. ### Scopes Examples - `report`: Access reports and datasets. - `webhooks`: Manage webhooks. - `company_file.write`: Upload company files. **Note**: Some endpoints accept both methods. Basic Auth is simpler for most use cases. Always use HTTPS.