Assessing the availability of the OAuth API

Our first check is to see whether the API is enabled on the server or not, and for this we will be making use of a simple GET request that will be sent to the /wp-json/ endpoint, which will then analyze the status of the response that has been received. A next step is to launch an HTTP client and send another request to the /wp-json/ endpoint, which would be something like this:

GET http://example-site/wp-json/ 

and will return a JSON response.

We have our focus upon on the oauth1 value that further sends us the authentication property value, and has within its properties the following: request, access, version and authorize.

Server responses will usually contain an empty authorization property if the OAuth ...

Get Learning WordPress REST API now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.