XF 2.1 Help with API to make a profile post?

Fullmental

Active member
I am just getting started working with the XF REST API, and I will admit I'm just a little confused. I am reading the XF API documentation, and there is an option to "Create a profile post" using the below API endpoint:

1599598562103.png

I thought this would be a great test to make sure my application is functioning correctly with POST statements before I start getting into editing content or users. However, according to the documentation, the only parameter you can pass is the user_id as an integer, and you get NO RESPONSE back.

So, how do you send the message text, and how do you confirm that the message posted successfully from within a program? Am I missing something?

EDIT: Also, when you are sending a conversation, there is a boolean parameter that determines when the conversation is "open" or not. I have tried this with the parameter set to "False", and the conversations are still open when I check my inbox on the main site. Is there a specific way the API expects a bool to be represented? I was copying the way it came in on a GET command for other parameters.
 
Last edited:
The docs for that endpoint appear to be incomplete, partially affected by a typo in markup in the code itself. These will be fixed next time we rebuild the docs.

The missing input is message and the output is success/profile_post. Similar values are applicable when updating a profile post so you can see them on that endpoint here: https://xenforo.com/community/pages/api-endpoints/#route_post_profile_posts_id_

In terms of bools, when passed as an input, you'd generally pass them as 1/0 for true/false.
 
Top Bottom