> For the complete documentation index, see [llms.txt](https://docs.higiocloud.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.higiocloud.vn/compute/4.-hi-gio-api/api-token-login.md).

# API token login

## <mark style="color:green;">**Overview**</mark>

In this manual, you will find detailed information on preparing information, creating a Token on the vCD portal, and creating a Bearer token.

## <mark style="color:green;">**Procedure**</mark>

{% stepper %}
{% step %}

#### **Step 1: Prepare Information**

\* Login IAM portal -> vCD portal: collect the information

* **{{vcd\_url}}**<br>

  <figure><img src="/files/RkuBeWBz8xXM1vckRwNJ" alt=""><figcaption></figcaption></figure>
* **{{tenant\_name}}**

*Ex: <https://iaas-hcmc02.higiocloud.vn/tenant/_**”tenant\\_name**_**”/**&#x76;dcs/dashboard>*<br>

<figure><img src="/files/5SX9fLBP7YUAR0742jB2" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Step 2: Create Token on vCD portal**

* Login IAM portal -> vCD portal -> User preferences<br>

  <div align="left"><figure><img src="/files/1gF6Ct4XvFLPMSQJFJ85" alt=""><figcaption></figcaption></figure></div>
* API tokens -> New

<figure><img src="/files/6LcuZYPJxr4nyadGsWZk" alt=""><figcaption></figcaption></figure>

&#x20;Copy token ({{api-token-generated}})

<figure><img src="/files/kmub2NUUV15MDJ6nP91g" alt=""><figcaption></figcaption></figure>

<br>
{% endstep %}

{% step %}

#### **Step 3: Creating a Bearer token**

* POST https\://{{vcd\_url}}/oauth/tenant/{{tenant\_name}}/token
* Authorization: No Auth
* Headers:

\- 'Accept: application/json'

\- 'Content-Type: application/x-www-form-urlencoded'

* Body:

raw: 'grant\_type=refresh\_token\&refresh\_token={{api-token-generated}}'<br>

<figure><img src="/files/yXQlToZGFOYM9ezuNNTj" alt=""><figcaption></figcaption></figure>

* SEND request.

Response body: "access\_token" (Bearer token)

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.higiocloud.vn/compute/4.-hi-gio-api/api-token-login.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
