I'm testing out the Stack Exchange API with a tiny script that fixes a typo.

It's written in PHP and used the implicit client-side OAuth flow to get the access token.

a fixed title

Lessons learned

 "error_message":"POST methods expects all parameters to be submitted as a form, not on the query string","error_name":"bad_parameter"}

Do not send JSON but a application/x-www-form-urlencoded POST request.

The write API is seriously underdocumented as noted in 2013 already: Tell us that POST is required to write


Even if you just want to change the title, you need to send the body. The body must be markdown, and your filter to fetch the body must be unsafe.


You also have to set the tags, even if you only change the title.

 "error_message":"Applications must have a registered Stack Apps post to write","error_name":"access_denied"}

This post here exists because of this message. Add the post URL to your stack apps entry.

You must log in to answer this question.

Browse other questions tagged .