REST API-based authentication

Among the several options that are available for authenticating with the API, the primary choice will cover one of these two options:

  • For a mobile, web or desktop client, that will be accessing the site externally, you will be using the OAuth method of authentication with the application of passwords or basic authentication
  • For themes or plugins that are running on a site, you will be making use of the cookie authentication method.

In the following sections, we will try to cover both of the options and their particulars.

OAuth authentication

The OAuth authentication method is the primary handler in authentication that is used for any external clients, making it go through the steps of a standard authentication and then ...

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.