Machine to Machine Authentication and Authorization for 3 or more .net web API code sample

Does anyone have sample code on how 3 or more .net API’s authenticate with each other using machine to machine authentication? I am having trouble understanding the concept.