trouble with WordPress API POST call
-
I had successfully deployed an automate.io bot that adds a new post to my WordPress website. After a while, it stopped working. Their technical support is unable to solve the problem, but they did share that they are calling with
{
"method":"POST","baseUrl":"https://terrabonafamily.org/MemberSite/","url":"/xmlrpc.php","headers":{"Accept":"application/xml","Content-Type":"text/xml","User-Agent":"Automate.io"},"body":"<methodCall><methodName>wp.newPost</methodName><params><param><value><array><data><value><i4>0</i4></value><value><string>username</string></value><value><string>password</string></value><value><struct><member><name>post_type</name><value><string><![CDATA[post]]></string></value></member><member><name>post_title</name><value><string><![CDATA[Test event]]></string></value></member><member><name>post_excerpt</name><value><string><![CDATA[short is good]]></string></value></member><member><name>post_format</name><value><string><![CDATA[standard]]></string></value></member><member><name>terms_names</name><value><struct><member><name>category</name><value><array><data><value><string><![CDATA[Upcoming Event]]></string></value></data></array></value></member></struct></value></member><member><name>post_date</name><value><dateTime.iso8601>20220330T00:00:00.000</dateTime.iso8601></value></member><member><name>comment_status</name><value><string><![CDATA[open]]></string></value></member><member><name>post_status</name><value><string><![CDATA[publish]]></string></value></member><member><name>post_content</name><value><string><![CDATA[<strong>Posted by:</strong> Jennifer\n\n\n<strong>Event Host:</strong> Jennifer\n\n\n<strong>Description:</strong>\nit just\n\n\n<strong>Who is Invited?</strong>\neveryone\n\n<i>Please note that for all events posted on Terra Bona, the Event Host reserves the right to refuse the registration of any participant or dismiss any participant for any reason. It is expected that the Event Host would do so with great charity and after exhausting all forbearance. </i>\n\n<strong>Date/Time:</strong>\n3/15/2022\n\n\n\n<strong>Type of Event:</strong>\ndrop\n\n\n\n<strong>Location:</strong>\nhere\n\n\n\n<strong>Cost/Donation:</strong>\nnone\n\n\n\n\n\n<strong>How to Pay:</strong>\ncash\n\n\n\n<strong>Registration Limit</strong>\nno\n\n\n\n\n<strong>How to Register/RSVP:</strong>\nemal me\n\n\n\n<strong>Registration/RSVP Deadline:</strong>\ntody\n\n\n\n<strong>Registration/RSVP List:</strong>\nnone\n\n\n\n<strong>Driving directions / What to do when you arrive:</strong>\nfigure it out\n\n\n\n<strong>What to bring/wear:</strong>\nclothes\n\n\n\n<strong>Volunteers:</strong>\nnope\n\n\n\n<strong>Other Details:</strong>\nnone\n\n\n\n<strong>Contact for questions about this event:</strong>\nok]]></string></value></member></struct></value></data></array></value></param></params></methodCall>","timeout":60000,"gzip":true}
The bot is receiving back
"<script>document.cookie = \"humans_21909=1\"; document.location.reload(true)</script>"
but the WordPRess api is supposed to return the post details.
This is causing the automate.io bot to fail with an unknown error.
Any ideas?
- The topic ‘trouble with WordPress API POST call’ is closed to new replies.