הודעה פרטית עם קובץ מצורף/העלאה דרך API

Is it possible to use the API to send a direct message with an attachment/upload?

This is possible through the web UI, but it isn’t obvious to me how to emulate this with the API.

לייק 1

Hi, you need two API requests. One to upload the file, which returns the url, and one to create the post in which you insert the URL.

3 לייקים

Thanks. When using the GUI the upload has different security depending on the context (topic vs private message), so I’d need to mimic the same settings in the upload API call to have the same outcome.

Looking at the API it isn’t clear to me how to achieve this