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?
- Angular: ‘Cannot find a differ supporting object ‘[object Object]’ of type ‘object’. NgFor only supports binding to Iterables such as Arrays’
- Use of PUT vs PATCH methods in REST API real life scenarios
- Select objects based on value of variable in object using jq
- How to install JQ on Mac on the command line?
- Representing null in JSON
- Are multi-line strings allowed in JSON?
- How to remove the quotes when reading a variable in jq in shell?
- How do you represent a JSON array of strings?
- Using Wikipedia API on custom wikis like Bulbapedia
- XSLT equivalent for JSON
- An error occurred while installing json (1.8.1), and Bundler cannot continue – Rails
- How to: Make JWT-authenticated requests to the WordPress API
- How to use OAuth authentication with REST API via CURL commands?
- Building a custom REST API
- What are the Oembed Links For?
- What is /wp-json?
- Import JSON feed to WordPress
- WP Rest API v2 filter and display latest post with specific tag
- How do I use the WP REST API plugin and the OAuth Server plugin to allow for registration and login?
- WordPress REST API call generates nonce twice on every call
- WP Rest API v2 return posts with specific tag
- Importing JSON feed should the content be sanitized?
- wordpress API for android app
- Authentication for wordpress website
- Options to get my custom post type metadata via the WordPress API
- Limit REST API output to current logged in user that is also author of the content
- Create Session with JWT
- Have WordPress generate a JSON of the content
- WordPress REST API – Modify JSON before importing
- Adding JSON Structured Data to WordPress
- esc_attr() corrupts json values
- Hook before posting via JSON REST API
- how to send Ajax request in wordpress backend
- Generate/save JSON or XML file from JSON script
- Authentication with the Rest API when using an External Application
- How to Get Featured Image from REST API?
- Calling an API to do authentication / user login
- WordPress + REST API v2 and private pages Load by slug
- body_class REST field in WP-API
- Submit comment via JSON from Android device
- Why is json_decode failing?
- PHP: authenticate for a REST request?
- Authenticate current user to REST API
- merge wp rest api query to get posts per category does not work
- REST API: wp_get_current_user not working on second call
- Advanced Access Manager: RESTful endpoint to refresh token
- Is there a way I can fetch the WordPress Developer Code References with an API?
- Strange “lea” prefix on wp-json
- How to display partial values of JSON Encode values
- wp-json API: not logged in when clicking link to the API from admin mode
- WP Rest API and json_decode()
- Retrieving a JSON feed of my posts and displaying thumbnails
- 403 error when publishing a post in wordpress. Error => Publishing failed. The response is not a valid JSON response
- Retrieve Data from Custom Endpoint
- Optimal WP Web App Backend for mobile app development
- Error message: Response is not a valid JSON response
- I’m receiving the following error using the below code: Uncaught Error: Cannot use object of type WP_REST_Response as array
- Need to use WordPress page as authentication for different service
- Automatically import content to wordpress from a json file
- GET request return value as error instead of success
- JSON api oembed youtube
- wp_nonce vs jwt
- Force REST API Authentication for each request method
- WP CLI in WP 5.3 with PHP 7.4
- Add binary or json animation to wordpress site
- How can I secure my custom rest api endpoint or add under a already existing rest group
- WordPress multisite REST API connection refused with android – redirects to home page when using IP address in Postman
- Autotrader API Integration
- Rest WP_Error always return null
- Fix Characters WordPress Ionic App
- Access featured image URL based on media ID?
- Get the name of the post type
- WP Rest API v2.0 user profile update issue
- Dynamic data table from external json feed
- Connecting a wordpress site to an AngularJS APP
- return content section as json in wp rest api v1
- Usage of wp_send_json_success and wp_redirect at the same time
- Get JSON from self hosted wordpress site
- Is it possible to make WordPress as a RESTful app?
- Connect my WordPress site users to my public site account without showing my public site credentials
- How do i save this python code to text file.? [closed]
- Properly process a custom WP REST API request (Authenticate, Authorize + Validate)?
- Rest Api WordPress
- Error /wp-json/wp/v2/posts/ [closed]
- How can I enforce user to use Application password to generate JWT token? [closed]