webe digital interview question

How do you secure and API endpoint?