# Obtain company information

Obtains company information such as the company name and the company ID.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/tenant/v2/tenant/query
HTTP Method | GET
Rate Limit | [1000 per minute、50 per second](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.** | Obtain tenant information(tenant:tenant:readonly)
Required field scopes | **Notice**：The response body of the API contains the following sensitive fields, and they will be returned only after corresponding scopes are added. If you do not need the fields, it is not recommended that you request the scopes.<br>获取企业完整域名(tenant:tenant.domain:read)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
tenant | tenant | Company information
name | string | Name of the company
display_id | string | Company ID. It uniquely identifies the company on the platform.
tenant_tag | int | A tag that identifies Personal Edition or Team Edition<br>**Optional values are**:<br>- 0：Team Edition<br>- 2：Personal Edition
tenant_key | string | Company identifier
avatar | avatar | Profile photo of the company
avatar_origin | string | Profile photo of the company
avatar_72 | string | Profile photo of the company in 72x72 pixels
avatar_240 | string | Profile photo of the company in 240x240 pixels
avatar_640 | string | Profile photo of the company in 640x640 pixels
domain | string | Enterprise full domain name. The enterprise domain name can be used by enterprise members to access web pages with URL addresses such as management background and cloud documents.<br>**Required field scopes**:<br>获取企业完整域名(tenant:tenant.domain:read)

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "tenant": {
            "name": "Name of the company",
            "display_id": "F123456789",
            "tenant_tag": 0,
            "tenant_key": "abcdefghi",
            "avatar": {
                "avatar_origin": "https://foo.icon.com/xxxx",
                "avatar_72": "https://foo.icon.com/xxxx",
                "avatar_240": "https://foo.icon.com/xxxx",
                "avatar_640": "https://foo.icon.com/xxxx"
            },
            "domain": "example.feishu.cn"
        }
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
404 | 1184000 | The company doesn't exist. | Check whether the value of tenant_access_key is correct.
403 | 1184001 | You don't have the permission to obtain company information. | If the ISV app was pre-installed and the company has never used this app in the last 180 days, the app cannot obtain the information about the company by calling this API.

