# Downloading attachments

Download the attachment according to the attachment token.

In the return value for calling the API "Employee directory information batch retrieval", the business type is the attachment field id, which is the attachment token.

**Notice**：![image.png](//sf1-ttcdn-tos.pstatp.com/obj/open-platform-opendoc/45cd5e20afde1fb4c39adb53b6277c08_PkRpUyB6u8.png)

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/ehr/v1/attachments/:token
HTTP Method | GET
Supported app types | Custom App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.** | Download attachments in Feishu CoreHR (Standard version)(ehr:attachment:readonly)

### 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)

### Path parameters

Parameter | Type | Description
---|---|---
token | string | Token to download attachment<br>**Example value**: "09bf7b924f9a4a69875788891b5970d8"

## Response

When the HTTP status code is 200, it means success

Return file binary stream

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
500 | 1241001 | Internal error | Try again or contact customer service of "Feishu CoreHR (Standard version)"
400 | 1241002 | Request parameter error | Check Attachment token
404 | 1241003 | Invalid Attachment token | Get Attachment token again
400 | 1241004 | Your company has not activated the Feishu CoreHR (Standard version) App. To activate Feishu CoreHR (Standard version) please enable the app at "Feishu Admin" | Enable "Feishu CoreHR (Standard version)" at "Feishu Admin"

