The best way to authenticate an app with the REST API would be to use OAuth. There’s a good section on OAuth Authentication the REST API documentation site. You will need to install the OAuth1 plugin on your site as well.
There are some gotchas with implementing the OAuth plugin on WordPress. I found this article on CSS Tricks captured some of the complexity of setting it up.
You’ll need an OAuth library in your Android application as well, I’ve seen ScribeJava recommended more than once. In fact, here’s a StackOverflow answer with a good implementation example.
If your app is just in testing mode, you could use Basic Authentication instead of OAuth, because it’s easier to implement, but it’s not recommended for production use because it’s less secure.
Related Posts:
- How to connect android app with WordPress website?
- Get Image URL instead of Attachment Id in Rest API
- WordPress Rest API: How do we validate with our custom API key?
- Include custom post meta value in fetched JSON
- authentication issue with rest api – rest_cannot_create
- WP REST API – Retrieve content from page
- WordPress JSON API returns normal site page in html. How do I get it to give me JSON?
- WordPress REST API “rest_authentication_errors” doesn’t work external queries?
- Can’t GET draft posts via REST API from headless frontend
- Create multiple posts with WP REST API at once
- Passing Meta array in wp-rest api
- Inserting custom post meta value using WP-REST API
- WP REST API format response
- WP Rest API in Android studio does not show Images
- How can cookie/session authentication be used in wp-json fetch request?
- Can comments be used in JSON?
- Can comments be used in JSON?
- Angular: ‘Cannot find a differ supporting object ‘[object Object]’ of type ‘object’. NgFor only supports binding to Iterables such as Arrays’
- Grabbing the current viewer count for youtube live streaming
- Use of PUT vs PATCH methods in REST API real life scenarios
- What is the easiest way to convert an Excel spreadsheet with tabular data to JSON? [closed]
- Can comments be used in JSON?
- Yahoo Finance All Currencies quote API Documentation
- Select objects based on value of variable in object using jq
- uncaught syntaxerror unexpected token U JSON
- What is the difference between YAML and JSON?
- How to install JQ on Mac on the command line?
- Representing null in JSON
- pretty-print JSON using JavaScript
- Fastest JSON reader/writer for C++
- Representing null in JSON
- YAML equivalent of array of objects in JSON
- Are multi-line strings allowed in JSON?
- Parsing a JSON string in Ruby
- Are multi-line strings allowed in JSON?
- Remove properties from objects (JavaScript)
- Python/Json:Expecting property name enclosed in double quotes
- How to remove the quotes when reading a variable in jq in shell?
- Why do i need `typings.json` file in an Angular 2 project?
- Basic example of using .ajax() with JSONP?
- How to parse JSON boolean value?
- Best way to save data in Unity game
- Javascript Object push() function
- Error message ‘java.net.SocketException: socket failed: EACCES (Permission denied)’
- How do you represent a JSON array of strings?
- Using Wikipedia API on custom wikis like Bulbapedia
- How to create JSON Object using String?
- How to Get JSON Array Within JSON Object?
- How to import a JSON file in ECMAScript 6?
- UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0x80 in position 3131: invalid start byte
- How to parse Excel (XLS) file in Javascript/HTML5
- XSLT equivalent for JSON
- RestClientException: Could not extract response. no suitable HttpMessageConverter found
- How do I parse JSON in Android?
- Is there a query language for JSON?
- Why do i need `typings.json` file in an Angular 2 project?
- Get JSON Data from URL Using Android?
- How do I make a JSON object with multiple arrays?
- An error occurred while installing json (1.8.1), and Bundler cannot continue – Rails
- Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
- How to sort a json file by keys and values of those keys in jq
- JSON and escaping characters
- No content to map due to end-of-input jackson parser
- [npm notice created a lockfile as package-lock.json. You should commit this file
- How to: Make JWT-authenticated requests to the WordPress API
- How to use OAuth authentication with REST API via CURL commands?
- Sending JSON string through wp_remote_post()
- WP Rest API: details of latest post including featured media url in one request?
- using wp_remote_get instead of file_get_contents [duplicate]
- Building a custom REST API
- Show popular post in another php website via WP REST JSON API
- What are the Oembed Links For?
- WP REST API only returning partial list of users
- WP JSON REST API (Ryan McCue) how to query posts with specific meta data with ‘AND’ relation?
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- WordPress REST API – Permission Callbacks
- WP API returning SQL results as strings, rather than numbers
- What is /wp-json?
- How do I create a user using the new JSON api in 4.7?
- Import JSON feed to WordPress
- WP Rest API v2 filter and display latest post with specific tag
- how to authenticate for the REST API from a plugin and from command line
- How to check WordPress website username and password is correct
- How do I use the WP REST API plugin and the OAuth Server plugin to allow for registration and login?
- How to loop through JSON data in wordpress WP REST API
- How to authenticate custom API endpoint in WooCommerce [closed]
- WordPress REST API call generates nonce twice on every call
- WP Rest API v2 return posts with specific tag
- Unset data in custom post type WordPress API (wp-json)
- How to Authenticate WP REST API with JWT Authentication using Fetch API
- WordPress REST API – JSON “Rendered” Content Incorrect
- How to retrieve wp_ json_encode data from custom WordPress database table
- How to use the new WordPress 4.4 JSON API?
- wordpress wp-json prefix issue
- How to: Rest endpoint returning empty object
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- Importing JSON feed should the content be sanitized?
- Can I authenticate with both WooCommerce consumer key and JWT?
- Create a new user using WP REST API and declare meta object
- Create filtered list of posts using JSON data