I’ve been working with the WordPress REST API Authentication plugin (from miniOrange) as part of an article I’m writing. I want to demonstrate how to integrate a third-party application with a WP site through the API.
The miniOrange plugin is actually great for API calls that only want to read, but if I want to post pages or other information to the site, it is necessary to authenticate as a user with privilege.
Unfortunately, this plugin doesn’t appear to even offer a trial mode for doing this. In order to use authentication modes that would allow writing, the plugin must be upgraded to the tune of somewhere between $150 to $400 (various sources of intel on this differ).
- Is this the ONLY suitable authentication plugin?
- Is there no other way to utilize the API for write operations without a similar plugin?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
In the documentation I could find, it seems there were four options.
- OAuth1.0a Server – this appeared to be unsupported and obsolete
- Application Passwords – This might work, but it seemed a bit awkward to me
- JSON Web Tokens – this appears to be unsupported and obsolete
- Basic Authentication – this appears unsuitable as far as I can see
I explored the API Authentication plugin from miniOrange, and discovered that you can do a lot of things with the free version.
You can GET pages, posts, comments, and media.
You can POST media, comments, and posts.
The plugin supports Basic Authentication, JWT authentication, or (with the premium version,) OAuth 2.0.
So the short answer to my question is, “yes, you can configure authentication for the WP API on your site without incurring big expense.”
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0