ContributionsMost RecentMost LikesSolutionsRe: Getting 403 response when creating message with attachment using API v2 and Python jeffshurtliff I got it working with the following code: import requests headers = { 'li-api-session-key': 'XXXXXXXXXX_XXXXXXXXXXX_XXXXXXXXXXXX', } files = { 'api.request': (None, '{\n"data":{\n"type":"message",\n"subject":"This is the message subject",\n"board":{\n"type":"board",\n"id":"KB1"\n},\n"attachments":{\n"list_item_type":"attachment",\n"items":[\n{\n"type":"attachment",\n"field":"attachment1",\n"filename":"pdf1.PDF"\n},\n{\n"type":"attachment",\n"field":"attachment2",\n"filename":"pdf2.PDF"\n}\n]\n}\n}\n}'), 'attachment1': ('/Users/will.bowen/Documents/pdf1.PDF', open('/Users/will.bowen/Documents/pdf1.PDF', 'rb')), 'attachment2': ('/Users/will.bowen/Documents/pdf2.PDF', open('/Users/will.bowen/Documents/pdf2.PDF', 'rb')), } response = requests.post('https://rsalink-stage.rsa.com/api/2.0/messages', headers=headers, files=files) Re: Getting 403 response when creating message with attachment using API v2 and Python We typically see this error when the JSON is malformed. The snippet you posted seems fine to me, but I may have missed something, so please take a moment to double check. In the meantime, I'll continue looking into this today. Re: Getting 403 response when creating message with attachment using API v2 and Python There's not much more to the message. lithium.util.NullArgumentException: exception=org.apache.commons.fileupload.FileUploadException: the request was rejected because no multipart boundary was found,lastItem=null Can you provide a link to the python requests doc that you mentioned? I'm going to see if I can recreate the issue, and I want to make sure I'm using the same library. Re: Getting 403 response when creating message with attachment using API v2 and Python Unfortunately, it is only accessible to Khoros employees. Re: Getting 403 response when creating message with attachment using API v2 and Python The error log is indicating the issue may be related to how the message is encoded. Specifically, the message is being rejected because no multipart boundary was found. I'm not too familiar with how python encodes api requests, but if you are able to successfully post a message with an attachment with curl or postman, you may want to double check how request.posts() is handling the attachments.