hanyuwomr
Member
How can I create thread via API
I try with curl :
curl --location --request POST 'https://mydomani/api/threads/' \
--header 'XF-Api-Key: apikey' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: xf_csrf=2BhTuRMyMgJeLU--' \
--data-urlencode 'message=test' \
--data-urlencode 'node_id=5' \
--data-urlencode 'tags=["hinovel","thẩm kiều thuận","tổng giám đốc bạc tỷ không dễ chọc","truyện full app","vietwriter"]' \
--data-urlencode 'prefix_id=2' \
--data-urlencode 'title=Title of the thread.' \
--data-urlencode 'message=Body of the first post in the thread.' \
--data-urlencode 'discussion_open=true' \
--data-urlencode 'sticky=false'
I can't call create thread although I can delete/update/view thread with that key and collection.
Response alway :
{
"errors": [
{
"code": "requested_page_not_found",
"message": "The requested page could not be found.",
"params": []
}
]
}
Please help me . Thanks
I try with curl :
curl --location --request POST 'https://mydomani/api/threads/' \
--header 'XF-Api-Key: apikey' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: xf_csrf=2BhTuRMyMgJeLU--' \
--data-urlencode 'message=test' \
--data-urlencode 'node_id=5' \
--data-urlencode 'tags=["hinovel","thẩm kiều thuận","tổng giám đốc bạc tỷ không dễ chọc","truyện full app","vietwriter"]' \
--data-urlencode 'prefix_id=2' \
--data-urlencode 'title=Title of the thread.' \
--data-urlencode 'message=Body of the first post in the thread.' \
--data-urlencode 'discussion_open=true' \
--data-urlencode 'sticky=false'
I can't call create thread although I can delete/update/view thread with that key and collection.
Response alway :
{
"errors": [
{
"code": "requested_page_not_found",
"message": "The requested page could not be found.",
"params": []
}
]
}
Please help me . Thanks