> 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="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FOIr5eYKRu6maB6PGTpkF%2Fimage.png?alt=media&amp;token=3b50b383-95af-40a9-acee-91885e6efe14" alt=""><figcaption></figcaption></figure>
* **{{tenant\_name}}**

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

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FeyY78ovkTU60SvdOsfZJ%2Fimage.png?alt=media&amp;token=e34630a0-2c8b-4413-ae4d-76c76e9dac91" 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="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FzH9nwczOX7igzjusUwRT%2Fimage.png?alt=media&amp;token=b1bf0dd5-9fe1-47c2-beed-7e18503398b6" alt=""><figcaption></figcaption></figure></div>
* API tokens -> New

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FIIEEgyWtZkUXT20i70BK%2Fimage.png?alt=media&amp;token=668d76d1-1895-4495-a56d-3c6bccc744e4" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FEqSGmZfI3eTpvJTaWYsk%2Fimage.png?alt=media&amp;token=4bfdc653-32a8-4805-a304-8c1560a7d027" 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="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FGpRWisWypPZC8xlw9lnN%2Fimage.png?alt=media&amp;token=81e4bc54-4977-4144-82cc-75ccfc8fc342" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
