How can I connect on a Wordpress website (and get it posts) using REST api? What I did:
- Installed the REST plugin on Wordpress (https://wordpress.org/plugins/json-rest-api/)
- Enabled it
But I can't get the posts. Only if I use CURL (but I would like to use requests)
import requests, json
r = requests.get('http://www.uaigeek.com.br/blog/wp-json/posts', auth=('admin', 'pass'))
print r.status_code
print r.json
Using CURL (curl -I http://www.uaigeek.com.br/blog/wp-json/posts) it works like a charm, but using requests it always get 403 error (sometimes 404).
How can I do that?