GET/users/{userId}/mail/{mailId}/attachments/{attachmentId}

メールの添付ファイルをダウンロードする。

Authorization

oauth2

Access Token を指定します。
指定の方法や Access Token の取得方法は 共通仕様 を参照してください。

Scope

mail
mail.read

HTTP Request

GEThttps://www.worksapis.com/v1.0/users/{userId}/mail/{mailId}/attachments/{attachmentId}

Path Parameters

ParameterTypeDescription
userId string 

ユーザーを特定する ID (URL エンコードする)

  • ユーザー ID (userId)
  • ログイン ID (email)
  • 自身 ("me")

required
example : me 
mailId string 

メール ID


required
example : 1 
attachmentId string 

添付ファイル ID


required
example : 1 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
data string 

添付ファイルのデータ (Base64 でエンコードされたデータ)


required
minLength : 1 
filename string 

添付ファイル名


required
minLength : 1
maxLength : 250 

Response Example

example

1{2  "data": "dGVzdA==",3  "filename": "file1.jpg"4}

HTTP 400

Bad Request

HTTP 404

Not Found