How to Run a Third Party URL in background after Button Click ? [onClick()]

I Want to Code by button onClick() feature in such a way that it should run a third part url(2factor sms). how can i do that.

My actual aim is that i have to create a site where is an employee wants to login to it, the head of the group should get an otp which he should share to the employee so that data is not breached.
if any solution pls let me know