# Fully automated API usage

**URL:** https://forums.suse.com/t/fully-automated-api-usage/18919
**Category:** SUSE Rancher Prime
**Created:** [November 30, 2020, 4:48pm UTC](https://forums.suse.com/t/fully-automated-api-usage/18919 "2020-11-30T16:48:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Monadt](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Monadt](https://forums.suse.com/u/Monadt)
#### Post date: [November 30, 2020, 4:48pm UTC](https://forums.suse.com/t/fully-automated-api-usage/18919/1 "2020-11-30T16:48:22Z")

</div>

Hello,

I have a question about a workflow I am trying to implement and would like to know if I am missing something obvious:

I want to setup a Rancher instance using Ansible and would like to provision some resource right out of the box (e.g. NodeTemplates, Users).

I would like to use the API to do this - but after starting Rancher I would need to create an API token for this.  
Is there any way I can get an API token without using the web UI?

I would very much like to not having to resort to selenium or pupeteer to get this working.

Thanks a lot for any pointers.

Best regards,

Monadt

---

<div class="post-metadata">

### Author: ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)
#### Post date: [November 30, 2020, 4:52pm UTC](https://forums.suse.com/t/fully-automated-api-usage/18919/2 "2020-11-30T16:52:21Z")

</div>

Our quickstart shows both Terraform and bash script examples: [https://rancher.com/docs/rancher/v2.x/en/quick-start-guide/](https://rancher.com/docs/rancher/v2.x/en/quick-start-guide/) and [https://github.com/rancher/quickstart](https://github.com/rancher/quickstart)

---

<div class="post-metadata">

### Author: ![Monadt](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Monadt](https://forums.suse.com/u/Monadt)
#### Post date: [November 30, 2020, 5:00pm UTC](https://forums.suse.com/t/fully-automated-api-usage/18919/3 "2020-11-30T17:00:39Z")

</div>

Ah yes - in the Vagrant Quickstart guide the login to the v3-public endpoint was exactly what I was looking for.

Thanks a lot!
