|
|
11 năm trước cách đây | |
|---|---|---|
| css | 12 năm trước cách đây | |
| img | 12 năm trước cách đây | |
| js | 12 năm trước cách đây | |
| .gitignore | 12 năm trước cách đây | |
| README.md | 12 năm trước cách đây | |
| config.sample.json | 12 năm trước cách đây | |
| index.html | 12 năm trước cách đây | |
| land.html | 12 năm trước cách đây |
An open source version of https://developer.wordpress.com/docs/api/console/ that works with WP API.
Once you have WP API and the OAuth server plugins activated on your server, you'll need to create a "consumer". This is an identifier for the application, and includes a "key" and "secret", both needed to link to your site.
To create the consumer, run the following on your server:
$ wp oauth1 add
ID: 4
Key: sDc51JgH2mFu
Secret: LnUdIsyhPFnURkatekRIAUfYV7nmP4iF3AVxkS5PRHPXxgOW
Note the key and secret returned here. You'll need those in a moment.
Time to link the console to your site. Copy config.sample.json to
config.json and begin editing. You'll need to set all options in there, and
your api_url setting should point to your API install without the
trailing slash:
{
"api_url": "http://example.com/wp-json",
"client_key": "sDc51JgH2mFu",
"client_secret": "LnUdIsyhPFnURkatekRIAUfYV7nmP4iF3AVxkS5PRHPXxgOW"
}
Replace http://example.com/ with the site you're running WP API on.
Open the console in your browser. You should see routes appear in the top left
of your screen. (If these are missing, your api_url is set incorrectly.)
To make authenticated requests, simply hit the Auth button and follow the steps on-screen!