API gets used as a documented method of interacting with other services, and that is why there is no exact answer to the question but applying OAuth and using a shared secret along with the request made can work as generic solutions.