What's the api for logging in via the server?

What’s the api for logging in via the server?

Without more information about what you want to do, that’s not easy to answer.
As far as I know there is no API specifically for this.

However if you are wanting to do REST, then Restivus makes logging in to the server pretty easy.

What I’ve got so far is this:

    const stampedToken = Accounts._generateStampedLoginToken();
    const hashStampedToken = Accounts._hashStampedToken(stampedToken);

    const userId = Meteor.users.find({'emails.address': data.email}).fetch()[0]._id;
    
    Meteor.users.update(userId,
      {$push: {'services.resume.loginTokens': hashStampedToken}}
    );

    // OR instead of adding the token directly to the user 

   Accounts._insertLoginToken(userId, stampedToken) 

What I’m doing is authenticating via another server and when I get a returned
token I wnat to log the user in on the server