# List Email Contacts

List Email Contacts
**Notice**：When using the tenant_access_token, it is necessary to apply for data permissions for accessing email contacts resources.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts
HTTP Method | GET
Rate Limit | [20 per minute](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.**<br>Enable any scope from the list | View email contact(mail:user_mailbox.mail_contact:read)<br>View, create, update, and delete email contact(mail:user_mailbox.mail_contact:write)
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>Read email address field of email contact(mail:user_mailbox.mail_contact.mail_address:read)<br>Read phone number field of email contact(mail:user_mailbox.mail_contact.phone:read)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>or<br>`user_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer u-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)

### Path parameters

Parameter | Type | Description
---|---|---
user_mailbox_id | string | User email address, or enter me to represent the current calling interface user<br>**Example value**: "user@xxx.xx or me"

### Query parameters

Parameter | Type | Required | Description
---|---|---|---
page_size | int | Yes | paging size<br>**Example value**: 20<br>**Data validation rules**:<br>- Value range: `1` ～ `20`
page_token | string | No | Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups<br>**Example value**: xxx

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
items | mail_contact\[\] | Mail contact list
id | string | Email Contact's ID
name | string | Email Contact's Name
company | string | Email Contact's Company
phone | string | Email Contact's Phone Number<br>**Required field scopes**:<br>Read phone number field of email contact(mail:user_mailbox.mail_contact.phone:read)
mail_address | string | Email Contact's Mail Address<br>**Required field scopes**:<br>Read email address field of email contact(mail:user_mailbox.mail_contact.mail_address:read)
tag | string | Email Contact's Tag
remark | string | Email Contact's Remark
avatar | string | Email Contact's Avatar
position | string | Email Contact's Position
page_token | string | Page identifier, when has_more is true, a new page_token will also be returned. Otherwise, page_token will not be returned
has_more | boolean | Whether the response body has more parameters

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "items": [
            {
                "id": "7256274576546463764",
                "name": "Sam",
                "company": "Lark LLC",
                "phone": "19912341234",
                "mail_address": "sam@example.com",
                "tag": "Friend",
                "remark": "Met at a music party",
                "avatar": "https://exampleimg.com/xxxx.jpg",
                "position": "CEO"
            }
        ],
        "page_token": "xxx",
        "has_more": true
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 1230001 | Parameter Error | Please retry after modifying the parameters.
403 | 1230002 | Internal Error | Please try again later.
500 | 1230003 | No Permission | Call this API after becoming a member of the public email or applying for relevant data permissions.

