Authentication

Every call carries a token for the person making it:

Authorization: Bearer $YOTTABOT_TOKEN

The token acts as you. It can do what your roles allow and nothing more, and everything it does is in your organization's audit record under your name.

Getting a token

Tokens come from yottactl, YottaBot's command line tool. You sign in once by approving a code in your browser at your company's sign-in page, and yottactl keeps the token. It carries your sign-in's second factor, so it can make changes.

yottactl login
export YOTTABOT_TOKEN="$(yottactl org token)"
curl https://<company>.yotta.bot/v1/directory/people \
  -H "Authorization: Bearer $YOTTABOT_TOKEN"

Or let yottactl make the call: every endpoint here has its command under yottactl org, shown on its page.

yottactl org users list

To get yottactl, see Install yottactl.

Keeping it safe

  • Send the token alone. A call that also sends a browser cookie or an Origin header is refused.
  • Treat it as a password. Anyone holding it acts as you until it ends.
  • Ending the session in the Access Portal's Security (Active sessions) ends it at once.