All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
1answer
9 views

Wordpress HTTP API NTLM Authentication

I was wondering if anyone has had to use NTLM authentication when using wp_remote_get? Trying to authenticate using Basic but that is returning the proxy error. When I use other authenticators for ...
0
votes
1answer
16 views

[Zapier + WP Webhooks Pro]: Custom Fields get cut off at first comma or semicolon

I'm using Zapier and WP Webhooks Pro to connect Google Sheet and WP to auto-publish posts for each row added to the spreadsheet. It works like as expected and all fields, including custom fields, ...
0
votes
1answer
15 views

Is There A Plugin to Create WP Multisite Installs programatically

So I created a wordpress multi-site and I want to be able to create multiple sites in the network programmatically. My subscription service has an API so I can create username and passwords on the fly ...
0
votes
0answers
20 views

“No Access-Control-Allow-Origin header is present” even though it is in the entry file

I'm seeing this in the Chrome browser console after doing a test fetch request: Access to fetch at 'http://localhost/wptest2/wp-json/pluginFolder/1.0/load?limit=10&offset=0' from origin '...
1
vote
1answer
14 views

How do I get the intended post type of a revision post?

I have a headless Wordpress instance with multiple custom post types. The build takes a few minutes, so I'm building a way to display drafts by fetching the latest revision via an API, like so: $...
1
vote
1answer
28 views

Headless Wordpress: How to authenticate front end requests?

I am envisioning Wordpress on the back end to work with React.js on the front end like this: Wordpress is installed on http://example.com/api React.js script is loaded into http://example.com/index....
2
votes
0answers
92 views

x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response

I would like my dev server on http://localhost:8080 to work with my wordpress install's rest api, of which the api base url is at http://localhost/wptest2/index.php/wp-json/ I am currently getting the ...
1
vote
1answer
20 views

Passing a borrowed nonce through Postman fails

I'm trying to test borrowing a nonce from my browser session so that I can use it elsewhere, namely in my npm dev environment. I took a nonce passed into an open Chrome browser session, put it in a ...
0
votes
0answers
36 views

I can't post comment via REST API

I try to insert comment via REST API , but i get this error : Query parameter not permitted: author I followed this docs and author is one of the arguments this is the link test that i use https:/...
-1
votes
1answer
19 views

Wordpress API standard compliance and specification for external database [closed]

HOW TO CONNECT WORDPRESS WITH EXTERNAL DB SERVER VIA API?
0
votes
1answer
69 views

REST API and filtering by meta value

I have a posttype 'timeslip' and I am calling this with the following API endpoint: /wp-json/wp/v2/timeslip?meta_key=user_id&meta_value=1 I have exposed my custom field user_id to the API meta ...
0
votes
0answers
25 views

Exclude categories in WP REST API response through function

I want to exclude some categories from the API response but not using the argument exclude but through function: When using the default route: https://example.com/wp-json/wp/v2/categories I want to ...
0
votes
1answer
45 views

Get a remote post ID via API given URL

Given you have a URL, how can you get the post ID of a post on a remote WordPress site? As far as I can tell, you would have to: HTTP GET /wp-json/v2/posts And then look for your URL, but the ...
0
votes
0answers
54 views

Deleting media using the Wordpress Rest API

I am trying to delete a media object from my Wordpress instance using the Wordpress API in Postman. I'm having trouble finding the endpoint according to the documentation. Here is my http method and ...
0
votes
1answer
41 views

Rest API: trouble receiving response through script (browser and Postman display correctly)

I made a simple plugin to practice connections to the WP Rest API. Testing a get request to http://localhost/wptest2/?rest_route=/wp/v2/posts/1 in browser and using Postman, I see the default "Hello ...
-1
votes
1answer
62 views

Rest API does not work after changing Wordpress Theme

Rest API works perfectly with default theme twenty sixteen, but when I change the theme the post on site does not appear. Anyone have the exact problem? <script type="text/javascript"> $(...
0
votes
1answer
94 views

wp_remote_get() returns 403 while file_get_contents() does not

We are working on a WordPress plugin and we require an API call. We are using the api: http://www.geoplugin.net/json.gp?ip=8.8.8.8 In this context: $response = wp_remote_get("http://www....
0
votes
1answer
24 views

Set logged in user based on API response

I have an external application that I want to redirect to a page on a wordpress site. The page needs to be different based on who is logged in. The application has an API endpoint which I can call ...
1
vote
0answers
75 views

Wordpress REST API “rest_authentication_errors” doesn't work external queries?

Wordpress REST API "rest_authentication_errors" doesn't work external queries? I was using following experimental codes for experimental purposes. add_filter('rest_authentication_errors', 'auth'); ...
0
votes
2answers
82 views

Images are displaying as blank images

I am trying to upload base 64 encoded images to my website media library via API. API returns with image ID but these images are displaying as blank images in my media library. Here is my code ...
1
vote
1answer
89 views

How to add WP API and JS featured image attachment

I would like to fetch the image from the wordpress rest api - I have the following code: HTML: <div class="post-item"> <div id="posts">Loading posts... </div> Ajax script: <...
0
votes
1answer
23 views

WordPress single page website redirect to index.html

I have developer angular app from WordPress rest API. I my WordPress baseURL and Angular app both are in same director (this is because WordPress and Angular URL are matched). But in this setup issue ...
0
votes
0answers
16 views

404 not found if user, email already exists [Plugin: JSON API User]

-I am using the JSON API User Plugin for WordPress Rest API data. -When i used this API to register a new user, if the user already exists, it retrieves a 404 not found. Thanks in advance Response :...
0
votes
1answer
23 views

How to get data from a private API and add it to wordpress pages

I got a private API (Cliniko) I want for example the full list of clients to be listed where I want on a page. I know how APIs work, what I don't know is how to implement them in Wordpress. Is there ...
0
votes
0answers
56 views

GETing data from a gzip compressed API?

I know WP can get JSON API data via a GET request, but does anyone know plugins/ways that I can get and decompress JSON data from a gzip compressed API? I would then output the JSON response to a ...
0
votes
0answers
21 views

WP API V2 Filtering URL request second tier

I currently have a WP API URL call that looks like https://siteurl/wp-json/wp/v2/knowledge_base?_embed&knowledge_types=8 The JSON code looks like [ { "knowledge_types": 8, } ] How ...
0
votes
0answers
28 views

woocommerce plugin to query external vendors REST API

All, I am attempting to assist a friend with some research as to how much it efford /cost it would take to start a woocommerce site to sell ATV/Motorcycle parts and accessories. The site would be ...
0
votes
0answers
790 views

Autotrader API Integration

I am looking to pull in a feed of used cars from Autotrader. Has anyone had any luck with the Autotrader API Docs and integrating with WordPress? Their current API documentation is very vague - is ...
0
votes
0answers
36 views

Relations between taxonomy terms for getting parent child nested Json objects and arrays

i have 2 taxonomies (cat) (subcat) and they have some terms(rows) for example , , i want make a relation like SQL data tables between the taxonomy terms for giving me a nested object of arrays in the ...
0
votes
0answers
417 views

REST API get featured image source for custom post type

I created a custom post type and am getting the posts using the REST API. The returned json looks like this... categories: [] content: {raw: "Morbi mollis tellus ac sapien. Etiam ut purus matt…allis ...
0
votes
0answers
52 views

API: get the post ID by “title” from external site with cURL

Given $title = "This is the title of a post"; I want to cURL the API and get the post ID. With v1 you could use the [filter] parameter, but that no longer works. There is a similiar question: https:...
0
votes
1answer
576 views

400 Bad Request - JavaScript App calling Custom wp-json endpoint

I have successfully created a new endpoint/route and can view it via wp-json. Not only that, I can successfully make a post request to this endpoint externally from the browser using the Restlet ...
0
votes
1answer
38 views

Periodically Query an external API on wordpress site

I am creating a wordpress site that will periodically retrieve data from an API and use that data to update info in the wp_users table. I don't really know how to go about this. I'll start with 2 ...
0
votes
1answer
805 views

Calling an API to do authentication / user login

I'm relatively new to wordpress and am working on a customized site. I have an API endpoint that I'd like to call to do authentication, because our users are going to have their credentials stored/...
0
votes
2answers
3k views

How to login via wordpress api and get user details?

I want to login via wordpresss api. I tried with "/wp-json/wp/v2/users" . but it just returns user 1 details. My goal is login via api and fetch all profile information.
4
votes
2answers
3k views

Why is per_page not working with categories in WP API?

To start I've been searching through several questions and documentation pieces but it seems with WordPress' v2 many of the old questions are no longer valid. What I am trying to do is get all posts ...
0
votes
0answers
206 views

Extending the API I created to return category names

I created this api using a plugin called WP REST API Controller. But it didn't return custom taxonomy categories so I installed a plugin called WP REST API – Pure Taxonomies, it's returning category ...
0
votes
1answer
109 views

Developing Themes with React/Angular

I am learning WordPress REST API and ReactJs.I think ReactJS would be a great asset for developing faster themes and plugins.But I have a question.May be I am new to React that's why i am confused ...
0
votes
0answers
707 views

REST API Working for GET but not for POST?

I am trying to create a post through the REST API. I am able to access the API by getting the existing posts, as per the screenshot below: However, when I try to do a similar request to create a new ...
0
votes
0answers
1k views

Allow REST API over HTTP, the rest of the site forced to HTTPS

I have a website with some custom api endpoints. I recently installed SSL and configured the website to redirect http visitors to https. I usually do this with the Really Simple SSL plugin. The https ...
0
votes
0answers
392 views

Rest WP_Error always return null

I have dificulties in my project, Im using Wordpress with WP Rest APi plugin. Im now making a plugin. The problem is, whenever I return something like this : return new WP_Error('...
1
vote
0answers
119 views

Exclude objects from Wordpress API based from ACF field using rest_prepare_{$post_type}

Lets say i only want custom posts where (date('Y-m-d H:i:s')<{acf_date_field}) I tried to return null; from my_rest_prepare_post. It seems like its working, but is this good practice, or should i ...
0
votes
1answer
2k views

WordPress REST Api: update user

I have created an user via wordpress api, then after registration, I save user's username and password into the sessionStorage, and then, finaly, try to edit user's profile. Here's my post request ...
-2
votes
1answer
92 views

How many users/load can the rest API handle?

Can the Wordpress rest API be used by thousands of public users at the same time or is it limited for only developers to use? I want to use the API to serve content to thousands of users, but am ...
1
vote
1answer
2k views

“rest_no_route” - Debug error

I am using Wordpress 4.9.5 and I want to create a custom endpoint like the following: <?php add_action('rest_api_init', 'miningRigsRoutes'); function miningRigsRoutes() { register_rest_route(...
4
votes
2answers
2k views

WP REST API only returning partial list of users

Started working with the WP REST API for the first time. Our ultimate goal is to dynamically load UI elements based on which user is presently logged in. However, my attempts to pull a list of all ...
0
votes
1answer
72 views

I would like to retrive JSON value and display it in wordpress page or widget

i am looking for a solution in wordpress on how to retrieve only one value from exchange api json json is avaible at: LINK TO JSON i would like to call value for Last variable in json and display it ...
1
vote
0answers
170 views

Limit post creation by role

Hi I want to limit post count a role can create. I am currently using Bainternet Posts Creation Limits. It works from dashboard but not for rest api.
0
votes
1answer
2k views

How to add an endpoint for my custom post type? /wp-json/wp/v2/posts is working but it didn't in the custom post

function create_api_posts_meta_field() { // register_rest_field ( 'name-of-post-type', 'name-of-field-to-return', array-of-callbacks-and-schema() ) register_rest_field( 'post', 'post-meta-fields', ...
5
votes
1answer
4k views

Fetch All Posts (Including Those Using a Custom Post Type) With Wordpress API

With the Wordpress API, we can use the following request to get all posts of the default 'post' type: http://example.com/wp-json/wp/v2/posts Supposing the 'books' and 'movies' custom post types ...