XF 2.1 REST API attachment_key_context_wrong

developr

Active member
Hi there,

I want to upload files via the Rest Api.

If I reply to an existing conversation or post I have to create a new attachment_key with POST to attachments/new-key containing a context.

Attachment key content type must be conversation_message with context[conversation_id] set to this conversation ID.

Which format is expected for the context?

This code doesn't work.

Code:
$attach_param = array(
'type' => 'conversation_message',
'context' => 'conversation_id='.$conversation_id
);

$attach_param = array(
'type' => 'conversation_message',
'context' => array('conversation_id'=>$conversation_id)
);
 
Last edited:
Back
Top Bottom