# \[SOLVED\] How to authenticate bots using the API

**URL:** <https://forum.mattermost.com/t/solved-how-to-authenticate-bots-using-the-api/2405>\
**Category:** Troubleshooting\
**Created:** [October 24, 2016, 3:43pm UTC](https://forum.mattermost.com/t/solved-how-to-authenticate-bots-using-the-api/2405 "2016-10-24T15:43:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jurgenhaas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/jurgenhaas/32/471_2.png) [@jurgenhaas](https://forum.mattermost.com/u/jurgenhaas)\
**Post date:** [October 24, 2016, 4:22pm UTC](https://forum.mattermost.com/t/solved-how-to-authenticate-bots-using-the-api/2405/2 "2016-10-24T16:22:19Z")

</div>

Found the answer. You need to create a user from the CLI which is not a SSO user:

```auto
cd /opt/gitlab/embedded/service/mattermost/i18n
sudo -u mattermost /opt/gitlab/embedded/bin/mattermost -config="/var/opt/gitlab/mattermost/config.json" -create_user -team_name="name" -email="user@example.com" -password="mypassword"

```

---

_[View the full topic](https://forum.mattermost.com/t/solved-how-to-authenticate-bots-using-the-api/2405)._
