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

Downloads a specified email's attachment.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

mail
mail.read

HTTP Request

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

Path Parameters

ParameterTypeDescription
userId string 

Member ID (must be URL-encoded)

  • User ID
  • Login ID (email)
  • Me

required
example : me 
mailId string 

Message ID


required
example : 1 
attachmentId string 

Attachment ID


required
example : 1 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
data string 

Attached file data (encoded with Base64)
The maximum attachment size is 25 MB, which is specified under Service > Mail > Attachment size limit in the LINE WORKS Admin.


required
minLength : 1 
filename string 

Attachment file name


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