Add basic auth for API endpoints