WordPress REST API和WP JSON API有什么不同?

I'm trying to code the user authentication feature for my app using API. I'm confused between WordPress REST API and WordPress JSON API? Based on the Q&A here, it says I need WordPress JSON API. If my WP already has REST API, do I still need this JSON API?

1个回答



是的,它们似乎不同。 Wordpress REST API似乎内置于Wordpress安装中。 我在我的网站上进行了测试,并且能够通过浏览器GET访问api以获取 / wp-json / wp / v2 / posts 。 这只是一个例子。 我想你提到的另一个选项是一个类似的插件,但请求的格式看起来完全不同。 我会坚持使用第一个开箱即用的解决方案。</ p>
</ div>

展开原文

原文

Yes, they appear to be different. The Wordpress REST API appears to be built into, and come with a Wordpress Installation. I tested on my site, and was able to access the api for posts via a browser GET to /wp-json/wp/v2/posts. This is just an example. I would imagine the other option you mentioned is a plugin that does something similar but the format of the requests look entirely different. I would stick with the first solution that comes out of the box.

duandan9680
duandan9680 是的REST API似乎适合访问帖子等,但是用户身份验证部分仅支持开箱即用的cookie身份验证。 看起来像插件是必需的,如下所述:developer.wordpress.org/rest-api/using-the-rest-api / ...
大约一年之前 回复
doujianmin6527
doujianmin6527 “第一个解决方案”意味着REST API? 但是,这可以实现用户身份验证操作吗?
大约一年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问