Questions tagged [api]

An application programming interface (API) specifies how some software components should interact with each other. In addition to accessing databases or computer hardware, such as hard disk drives or video cards, an API can be used to ease the work of programming graphical user interface components. In practice, most often an API is a library that includes specifications for routines, data structures, object classes, and variables.

Filter by
Sorted by
Tagged with
0
votes
0answers
22 views

AJAX request from Chrome Extension to Wordpress Website

I developed a chrome extension which extract some data from the user visiting page and I want to transmit them to my database by an AJAX call (my website is a basic wordpress website). The point is ...
0
votes
0answers
19 views

WP REST API Create media return Timeout Gateway in response, but media created

Have a problem with REST API for creating media Trying post image to WordPress and got the good result – media created and Postman got response with id of the new image. But when I run request from ...
0
votes
1answer
19 views

Adding Amchart Interface to Wordpress API

I'm using the amchart wordpress plugin and want to add support for it via the wp rest API. Here's what I've done so far: in ../includes/setup.php (To $args array I've added: This will create the /...
-1
votes
0answers
30 views

WordPress.com REST endpoint for /wp-json/wp/v2

The REST endpoint /wp-json/wp/v2 is available for self-hosted WP blogs. Where do I find this endpoint for blogs that run on WordPress.com? I tried https://public-api.wordpress.com/wp/v2/sites/example....
0
votes
0answers
10 views

Include dynamic generated pages in Wordpress search

I am creating 7-8 pages dynamically based on a JSON response from recruitee and want to include those pages in my search so that if someone is searching for "webdev" matching results are getting shown....
0
votes
1answer
16 views

Wordpress output data to another website and pull data

Would you like to ask, is it possible to send data from the WordPress website to another website, and get the data back from another website? I would like to make a function with text insert and a ...
0
votes
0answers
12 views

How do I allow CORS from my mobile application to my WordPress backend?

I am using WordPress Contact Form 7 plugin to send message from my mobile application. Of course testing with PostMan worked with no issues but as soon as I tried to post to the endpoint from my ...
0
votes
0answers
17 views

wordpress “rest_invalid_handler” error

I want to write some api and api callbacks are static functions within multiple classes. But when I call api I get the following error: ‍‍‍ { "code": "rest_invalid_handler", "message": "The ...
0
votes
1answer
17 views

Custom API plugin to execute 3rd party API to retrieve data

I am new to WordPress here. I have this request where I need to create a custom REST API plugin where when user triggers the following URL link: www.example.com/wp-json/v1/getCoupon/123456?CouponID=...
0
votes
0answers
12 views

Login with Facebook via API

I am making an Android app that uses the WP V2 REST API. The main site allows for login with facebook to leave comments. I would like to extend this same ability to my Android App. Is it possible to ...
0
votes
0answers
19 views

How to write the backend for a simple single page application

I want to write a small app on a particular wordpress page which should have following basic functions: After choosing an item in a drop-down menu, get respective information via a GET request (AJAX?)...
0
votes
0answers
44 views

Intergrate JSON into wordpress

is there an easy way to intergrate a JSON script in to Wordpress? I have a JSON API from a thirt party sorftware company which i have to use so customers can create an account on our site. Thanks in ...
0
votes
0answers
27 views

Send a JSON Data from a Form in WP to external API

I made a form in WP but I need to send all the data from the form to an external API in JSON Data, but I don't know how to do that, I just need suggestion on how to do that.
0
votes
0answers
18 views

WooCommerce API url

I'm new to woocommerce API and from what I've read, the URL should be in the form: "The request URL we'll test is wp-json/wc/v2/orders. On localhost the full URL may look something like this: https://...
0
votes
1answer
23 views

How to display “META” array in register_taxonomy

How do I get the "META" field to go off "META: []" for something filled in? I am using this code: register_taxonomy( 'job_listing_category', 'job_listing', [ 'labels' => [ ...
1
vote
1answer
52 views

Get all PDF files from page with WordPress API

I am looking for a way to get all PDF Files from a WordPress post using the WordPress API. I get all attached files with this: https://www.domain.com/wp-json/wp/v2/media?parent=1267 But when I try ...
0
votes
0answers
24 views

Loop through Wordpress API response errors

I am having trouble parsing my AJAX response from my WordPress API that my hybrid mobile app is making. Below is (one of many ways I have tried to parse the response all of which have not worked): ...
2
votes
1answer
25 views

Options to get my custom post type metadata via the WordPress API

I am using a plugin that adds multiple custom post types all of which have their own meta-data. I am able to expose the custom post type to WordPress's API but the metadata collected with those post ...
2
votes
1answer
32 views

Should I ask my Twitter plugin users to create their own Twitter App and API Keys to use my plugin?

I am creating my first WordPress plugin. It is a Twitter plugin that uses Twitter API 1.1 and OAuth 2.0 to generate a bearer token and then use that to fetch Tweets from Twitter. The plugin is almost ...
1
vote
0answers
32 views

Sending post request with wp_remote_post not working correctly

I need to submit a form on the woo-commerce product page via restful API custom endpoint the problem is the wp_remote_post not working correctly with me or me mostly I did something wrong. The form ...
1
vote
1answer
19 views

Output and filter data from a XML url

I have a URL provided by my Real Estate service that lists, in a XML file, every apartment and house that I have to sell. The XML url lists every detail of every apartment, things like images, year ...
0
votes
0answers
21 views

Generate PDF form on click a button

I developed a WordPress website that has a game developed by unity, and once the player finished the game he got a result button once he clicked the button I need some API to create a database record ...
0
votes
0answers
30 views

Connecting Wordpress with an External API

I need insight into connecting a Wordpress with an external API. This is the expected action needed to be carried out. A user tries to search on the Wordpress with four different forms fields (...
0
votes
0answers
16 views

API POST to Quickbooks with OAuth

I have created a form on my website for the customer to fill, and I would like to use this data to create a customer in Quickbooks, I have the javascript API code functioning in vs code with node.js, ...
0
votes
0answers
10 views

Accessing array elements WOOCOMMERCE API

I would really appreciate who can guide me with the following: I have the following ARRAY, it is a record of a product in woocommerce-wordpress that RETURNS three DIFFERENT variations: 1837, 1838 and ...
0
votes
0answers
11 views

One time call to external API in widget

I want to make only one call to external API in the 'my_widget' class here is an example: class my_widget extends WP_Widget { public function __construct() { $args = array( '...
0
votes
0answers
267 views

WP Rest API not working

WP 5.2.4 /wp-json/wp/v2/ Gives 404 error. I updated permalinks,have a working .htaccess on Apache and not using "plain permalinks" and still this thing don't work. My Apache and its configuration ...
0
votes
1answer
33 views

WordPress SMS API integration without plugin error

I have created a code for WordPress to integrate my custom SMS API. The API URL works fine when I type it on the URL bar; but when it in the code, the API URL will not call. So this code not working ...
0
votes
0answers
23 views

User login based on third party API

I am about to create a member site. I have all login credentials and user data in a external REST API. I want to use WordPress as the core to let the users login with their e-mail and password and ...
0
votes
1answer
29 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
27 views

How to save one API response to WooCommerce order meta data

Have one custom checkout field email type that validates if the email exists or not in a remote server. I sent JSON data to the remote server with this field. If email exists JSON response typically:...
0
votes
1answer
23 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
19 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 ...
2
votes
0answers
23 views

Looking for a solution - slightly convoluted problem

OK so stick with me on this one... it's a little involved. I won't describe it all, I'll simplify things as best I can to the basics. OK so, on my wordpress site I have three text boxes (BOX1,BOX2,...
0
votes
1answer
16 views

How can I get a get a list of customers from a list of email addresses?

I would like to get the order history for 25k customers. I have each of the customer's email address. My current pipeline is to loop through the email addresses, get the corresponding customer, then ...
0
votes
0answers
163 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 '...
0
votes
0answers
28 views

wp_remote_get, how to update dynamically

please i want the ETHBTC price to be updating dynamically without refreshing the page,, if i use (meta http-equiv="refresh" content="5") it refresh the site. i want only the ETHBTC price to be ...
1
vote
1answer
21 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: $...
0
votes
0answers
12 views

How do I append options to a select box in the customiser from an API call?

I'm working on a WordPress theme and I've added a select box to allow users to select a font for their site. I figured I'd use the Google Fonts API to grab the list of fonts rather than add all 900-...
0
votes
1answer
39 views

Headless WordPress – Issue with plugin path

Working on my first decoupled site. Backend is handled by WordPress and lives on the subdomain admin.mydomain.com and the frontend lives at mydomain.com. The first issue I saw with the headless ...
0
votes
0answers
7 views

API Function to use in place of global $menu?

Just wondering... Googling it I cannot find it. I'd like to not depend on globals at all in any circumstance.
2
votes
1answer
147 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....
3
votes
0answers
544 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
60 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
53 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:/...
0
votes
0answers
16 views

WordPress JSON Volley Only Get One Last Value

I wanna get list posts based on specific category from this url https://www.kisahmuslim.com/wp-json/wp/v2/categories using JSON Volley, but unfortunately it only get the last value. I don't know ...
-1
votes
1answer
22 views

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

HOW TO CONNECT WORDPRESS WITH EXTERNAL DB SERVER VIA API?
0
votes
0answers
25 views

How do I make secure API calls from my Wordpress plugin?

I've stumbled upon this problem which I just can't seem to figure out.. I am currently in the midst of developing my own Wordpress plugin. The plugin I'm building serves as a dashboard interface that ...
0
votes
1answer
40 views

How to use filters/params in wordpress as headless cms api

we are using wordpress as a headless cms, using custom post type and advanced custom field plugin, we are entering data in the fields in custom posts, localhost:8888/wordpress/wp-json/wp/v2/places?...
0
votes
1answer
96 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 ...