title: REST API design pattern to register new users without frontend
body: <p>I am building a REST API with some CRUD resources (in laravel, if that matters). Now I came to the point where I need to add authentication to my application. I personally would like to avoid building a whole user interface (as webpage, etc), but rather stick to a REST API that you can use with curl for example.</p>
  <p>But how would you design such a pattern? Should users register through the rest api, should I manually create new users? My system won't have much users, it is just a developer access where I want to give different companies access to the data.</p>
  <p>A login/session for REST does not make sense to me, it would also make the API more complicated, especially without frontend. Isn't there a common solution/pattern for that, that people already use?</p>
  <p>So questions I am thinking about:</p>
  <ol>
  <li>Should people use something like <code>/register</code> or should I create users via cmd myself?</li>
  <li>How do I avoid that strangers could register? Or how would I handle giving out/upgrading  permissions for specific users?</li>
  <li>Should I really create new users or only have a single user (me/admin) that gives out tokens with specific capabilities?</li>
  <li>How to I manage roles/rights? On a token basis, on a user basis or both?</li>
  <li>How do I transmit the token safely to the new user? I'd like to avoid having complex email handling as well in my application.</li>
  </ol>