Securing the API