admin管理员组文章数量:1125558
I am running a local Wordpress backend (port 8888) with a VueJS frontend (port 8081) that loads data via the json REST API. This works fine. However, when I click a preview link in the backend (for example when I made changes to a page), it opens the frontend in a new tab with some preview params, for example:
http://localhost:8081/work/?preview_id=11&preview_nonce=d738b8953f&preview=true
Now, I need to use these params to get the preview data via the json REST API, so I add these params to the fetch the preview data:
http://localhost:8888/wp-json/wp/v2/pages/11?preview_id=11&preview_nonce=d738b8953f&preview=true&acf_format=standard
However, this call returns a 403 Forbidden error. It must be some authorization problem. Is there a way to get this to work without using JWT auth?
Thanks!
本文标签:
版权声明:本文标题:json - Preview endpoint REST API gives 403 error 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736602160a1945241.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论