Gaj*_*jas 1 wordpress wordpress-plugin
我遇到wordpress json Api的问题登录用户时.目前我正在使用下面列出的插件的Wordpress版本4.5.1:
以下是我遵循的步骤:
1)生成nonce
http://example.org/api/get_nonce/?controller=user&method=generate_auth_cookie
以下是回复:
{"status":"ok","controller":"user","method":"generate_auth_cookie","nonce":"4d080ff7b8"}
Run Code Online (Sandbox Code Playgroud)
2)生成Auth Cookie
以下是回复:
{"status":"error","error":"SSL is not enabled. Either use _https_ or provide 'insecure' var as insecure=cool to confirm you want to use http protocol."}
Run Code Online (Sandbox Code Playgroud)
为什么我收到此错误?
似乎JSON API User和JSON API Auth插件默认只允许通过https连接.
要关闭此设置,您应在请求中发送一个额外参数:
insecure=cool
Run Code Online (Sandbox Code Playgroud)
请尝试以下请求:
http://example.org/api/user/generate_auth_cookie/?nonce=+4d080ff7b8&username=example&password=example&insecure=cool
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3619 次 |
| 最近记录: |