# Token

> **Package : spaceone.api.identity.v2**

\
\


## Token

**Token Methods:**

| Method                                                                                                         | Request                                                                                                                            | Response                                                                                                                     |
| -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [**issue**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/Token/README.md#issue) | [IssueTokenRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/Token/README.md#issuetokenrequest) | [TokenInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/Token/README.md#tokeninfo)           |
| [**grant**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/Token/README.md#grant) | [GrantTokenRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/Token/README.md#granttokenrequest) | [GrantTokenInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/Token/README.md#granttokeninfo) |

\


### issue

+noauth

> **POST** /identity/v2/token/issue

\{{< tabs " issue " >\}}

\{{< tab "Request Example" >\}}

[IssueTokenRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/Token/README.md#issuetokenrequest)

* **credentials** (Struct) `Required`
* **domain\_id** (string) `Required`
*   **auth\_type** (AuthType)

    _LOCAL, EXTERNAL_
* **timeout** (int32)
*   **verify\_code** (string)

    _if MFA is enabled, verify\_code is required_

\{{< highlight json >\}} { "credentials": { "user\_id": "wonny@cloudforet.io", "password": "Password0\*" }, "auth\_type": "LOCAL", "domain\_id": "domain-123123a" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### grant

+noauth

> **POST** /identity/v2/token/grant

\{{< tabs " grant " >\}}

\{{< tab "Request Example" >\}}

[GrantTokenRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/identity/v2/Token/README.md#granttokenrequest)

* **grant\_type** (GrantType) `Required`
* **token** (string) `Required`
* **scope** (Scope) `Required`
* **timeout** (int32)
* **permissions** (string) `Repeated`
* **domain\_id** (string)
* **workspace\_id** (string)

\{{< highlight json >\}} { "grant\_type": "REFRESH\_TOKEN", "token": "your\_refresh\_token\_from\_issue", "scope": "DOMAIN", "domain\_id": "domain-123123a" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\
\


## Message

### GrantTokenInfo

* **access\_token** (string) `Required`
* **role\_type** (RoleType) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
*   **role\_id** (string) `Required`

    \


### GrantTokenRequest

* **grant\_type** (GrantType) `Required`
* **token** (string) `Required`
* **scope** (Scope) `Required`
* **timeout** (int32)
* **permissions** (string) `Repeated`
* **domain\_id** (string)
*   **workspace\_id** (string)

    \


### IssueTokenRequest

* **credentials** (Struct) `Required`
* **domain\_id** (string) `Required`
*   **auth\_type** (AuthType)

    _LOCAL, EXTERNAL_
* **timeout** (int32)
*   **verify\_code** (string)

    _if MFA is enabled, verify\_code is required_

    \


### TokenInfo

* **access\_token** (string) `Required`
*   **refresh\_token** (string) `Required`

    \
