How To Make API Login

I want to make APi Login. But I don't know the code and step make it. Please help me to make it?