Skip to content

Application/json post????

dontforget fsesefe

Asked Feb 2, 2013, 9:46 PM EST1 answer
Share
LinkedInX
uri string = https[:]//public-api.wordpress.com/rest/v1/sites/[Blog-ID]/posts/new?http_envelope=1

method
= post

request.accept
= application/json, text/javascript, */*; q=0.01

content type = application/x-www-form-urlencoded; charset=UTF-8

I cannot post these kind of sites with webrequest, what is the reason of this..? I can only post to html/text sites..
but this (application/json) wp site give an error like "{"code":403,"headers":[{"name":"Content-Type","value":"application\/json"}],"body":{"error":"unauthorized","message":"User cannot publish posts"}}"

how can I post these kind of sites.. what should I do?

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.