My API endpoint returns 401 Unauthorized