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
1 answer
29 views

Encountering 400 Bad Request Error When Sending Form Information to API through Elementor

I’m currently working with an API and Elementor, and I’m trying to send form information to the platform API. However, I’m encountering a 400 Bad Request error when making a request to my server. The ...
Diane Rendel's user avatar
0 votes
0 answers
24 views

Transmit headers and footers via API from one site to another

I'm trying to have the same header and footer as my WordPress site on another site (that doesn't use WordPress) with a different domain and hosting. The manager of the other site wants it via API but ...
LesCa's user avatar
  • 21
0 votes
0 answers
27 views

Can't save Image from external API into Database

I am trying to create a plugin that gets data from an external API and stores the data into the database. The data I am receiving, contains Texts and Images. I have to save them separately as in the ...
I. Antonov's user avatar
0 votes
1 answer
67 views

WordPress getting data from external API

I am trying to create a Plugin that does the following jobs: Authenticate the user to get Bearer token 'access_token' Get data from API and store in Database I have checked all the APIs and ...
I. Antonov's user avatar
0 votes
1 answer
28 views

Image size not showing up in 'wp/v2/media'

I'm trying to get the URL of a specific image size, and I'm using apiFetch: const response = await apiFetch({ path: `wp/v2/media/${id}`, method: "GET", }); The ...
Vincent's user avatar
0 votes
1 answer
76 views

'403 Forbidden' when publishing a post containing different blocks

I'm experiencing a werid issue I never ran into before. I'm on WordPress 6.3.1 and each time I try to publish a post on my blog I get the "Updating failed. The response is not a valid JSON ...
Css14's user avatar
  • 13
0 votes
1 answer
23 views

I only want to show links to categories that have posts in 'publish' state in my menu

I am working on a WordPress project where I want to dynamically filter menu items (and possibly their parent items) based on whether they are associated with any published posts. Specifically, I am ...
CodingWeb's user avatar
  • 101
0 votes
0 answers
14 views

Can external API content be added to Rest API in Wordpress

Is it possible to fetch data from an external API, and put them inside of Wordpress REST API? For example, schema would look like this $api = 'https://valorant-api.com/v1/agents'; $json_data = ...
Jovan Jovanovic's user avatar
0 votes
0 answers
24 views

wp_remote_post to admin-ajax.php isn't sending body value

I'm trying to get my code to get the TMDB API data but since the API response contains multiple pages, I'm trying to recursive call my function and increment the page number each time. I'm logging to ...
SeanB's user avatar
  • 1
0 votes
1 answer
26 views

Trying to create and update wordpress from python library

The Background: I am a software developer that is trying to create a sports analytics website. I used to created wordpress-based sites on the side so I have a WHM where I can host sites. I'd prefer ...
AdamCodes716's user avatar
0 votes
1 answer
147 views

Appointment booking system in WordPress

I have to make an appointment booking system with WordPress, I have a custom post type "appointments" with various various custom fields like : Name, email, date, time, office, service... ...
LesCa's user avatar
  • 21
2 votes
1 answer
419 views

Can I send a body using wp_remote_get()?

I'm writing a WordPress plugin and want to retrieve data from my API on another domain using wp_remote_get() On this page: https://wp-kama.com/function/wp_remote_get There is a Usage Template: $...
HardlyNoticeable's user avatar
0 votes
0 answers
109 views

How to pass a file to an API call through WordPress

I want to pass a file to an API call for translation the action of this button of submit still doesn't direct to any page, so should I make this pure PHP or Ajax gonna take a role here? This's the ...
Mostafa Ezzat's user avatar
0 votes
1 answer
105 views

All wp-json routes suddenly return 404

I'm having a problem, where all API routes on a site are now returning a 404 error. This has been working for quite some time but just recently started doing this. I'm not sure if it was from an ...
chrispytoes's user avatar
0 votes
1 answer
31 views

How to submit a button automatically after every scheduled hours?

How to submit a button automatically after every scheduled hours ? I tried some JavaScript but all failed. What I am doing? I am trying to fetch product categories from an external API Why I want ...
Ricky's user avatar
  • 53
0 votes
0 answers
121 views

How to consume external API from WordPress post editor and display the response data in the custom field?

I am developing a custom post type called "Team," where I will add some profiles of team members. I am using ACF for the custom field to add personal details of the members (I can also ...
Rousnay's user avatar
0 votes
1 answer
266 views

Uploading media to wordpress API with C# HttpClient

I was trying to save some media but I can't get it to work. I don't know if its the authorization is the wrong format, or if its the content is just put in wrong. If someone knows how to please help ...
UltimateSeeSharp's user avatar
0 votes
1 answer
272 views

JS WordPress API fetch no response headers

I am using the @wordpress/api-fetch package to try and retrieve the information for a Custom Post Type like so: const query = { page: currentPage, parse: false, per_page: 1, status: 'publish', }; ...
Ronald's user avatar
  • 23
0 votes
0 answers
213 views

Issue with API after 6.2 update

I have a python program that automatically updates pages/posts on my websites. Recently I started getting this error only on the websites with 6.2 update: 400 - Bad Request | Your browser sent a ...
Fadi's user avatar
  • 73
0 votes
1 answer
56 views

Forminator + Hubspot Workflows

I need to send Forminator form data to a Hubspot workflow for a client. This doesn't seem to be working function send_form_data_to_hubspot($form_data) { $hubspot_api_key = 'MY_API_KEY'; $...
Mark Tabner's user avatar
0 votes
1 answer
121 views

Adding Microsoft Teams Incoming Webhook to WordPress, Problem with Rest Route?

I am trying to implement an incoming webhook on my WordPress website to send a message to MS Teams when I receive a form submission. The message includes an ActionCard with a multiple choice input ...
Aristocles's user avatar
0 votes
1 answer
297 views

Login and register by API

When we install WordPress with Softaculous, a Login button appears and we log in to the site without entering the username and password we pressed. We have a site where we sell digital subscriptions. ...
sakarya's user avatar
  • 222
0 votes
0 answers
113 views

Woocommerce API for calling products by Category ID

I belong to a Non Technical background. I have recently built an app from freelancers, Now I am looking to call the products from woocommerce by using category id. Can someone suggest how can I do it? ...
Bhaskar Mishra's user avatar
0 votes
1 answer
70 views

Using Wordpress API to mass update posts freezes the server

Our site has recently been infected and a malware code was added to all the 5300+ posts. I wrote a simple app using Wordpress PCL to update the texts of all posts. But after updating a couple hundreds ...
unnanego's user avatar
0 votes
0 answers
136 views

Unable to retrieve Users (Not logged in) through WP Rest API

We are able to retrieve Rest API results of our WP database, running a Learndash plugin. We can retrieve details while not logged into the WP site, although limited (10 records or so). While logged in ...
Matthew Wragg's user avatar
0 votes
2 answers
282 views

Programmatically creating posts based on external JSON feed (asynchronously)

I am currently trying to create a Wordpress plugin which create posts in the Wordpress database based on data from an external JSON API. As an example this NewsAPI feed could be used: https://newsapi....
Joachim's user avatar
  • 21
0 votes
2 answers
485 views

External api call using wordpress

I want to start a new website and chose wordpress as my cmd, but im having a restriction. The website is all about api request to other websites and i triedto get an api to test it as an example. ...
Taofeeq Tajudeen 's user avatar
2 votes
1 answer
536 views

Is it possible to create post in wordpress using postman?

We have tried to create a post in WordPress using postman, can't able to create one since we have received an error as you are not allowed to do this action Even though I entered the admin login, it ...
Ajith kumar's user avatar
0 votes
1 answer
24 views

How to write a plugin that "listens" every time, an edit occurs?

Let's say I want to write a plugin that replaces (i.e.: overwrites) every src-tag of every iframe-element on a WP-Website with a custom string AND the plugin shall watch every new post or page-edit ...
mdthh's user avatar
  • 103
0 votes
0 answers
73 views

move setting data from wordpress api to codestar freamwork

I am coding a plugin that uses the Star code framework It should be mentioned that I had written this plugin using WordPress API before. Now I want to integrate and make it more advanced, but I ran ...
masoud nkh's user avatar
0 votes
0 answers
15 views

Create WordPress account on different domain when WooCommerce order completed

I have 2 domains with 2 different WordPress instances: shop.example.com (WooCommerce) courses.example.com (LearnPress) When someone buy course from shop.example.com I want to automatically create ...
mikolaj's user avatar
0 votes
0 answers
30 views

display posts, pages and custom post types from another wordpress site

I have 2 sites one acting as a parent and the second acting as a branch of the organization. The sites are on different domains and databases. I want to display on the branch site some posts and ...
Joxmar's user avatar
  • 103
1 vote
1 answer
39 views

Store large dataset in WordPress installation temporary

My WordPress plugin depends on a large dataset (around a megabyte). The dataset is downloaded through REST API and then decoded to a PHP array. Right now the dataset is downloaded on each page load ...
pstidsen's user avatar
0 votes
0 answers
41 views

Send PUT remote request with BuddyPress checkbox

I am trying to create a code that when a BuddyPress user set active a Xprofile field checkbox a PUT remote request will trigger and update a single property of json endpoint, but i am not able to get ...
Honoluluman's user avatar
1 vote
1 answer
196 views

Why is this specific API request failing when sending via wp_remote_post?

I'm pulling my hair out trying to make a POST request to an API endpoint using wp_remote_post. The API needs a request with content-type multipart/mixed but WordPress doesn't seem to play nicely with ...
WackGet's user avatar
  • 111
1 vote
2 answers
92 views

How to cut a section of a URL from a string with a regular expression?

I am pulling a response from an API using PHP to display a list of content on my WordPress website from an external service. The way they have their API set up, I need to create a loop that checks if ...
NathanThreelines's user avatar
0 votes
1 answer
52 views

How can I send api calls from my plugin?

I have a collection of REST APIs that our android app uses. We use POSTMAN to send requests and troubleshoot them. Now, I am working on a plugin where I am trying to send API calls to all the ...
Rajin Sharwar's user avatar
1 vote
0 answers
51 views

Anyway to disable the auto excerpt creation?

I am using Wordpress as a headless CMS and getting the posts from the API endpoint in 11ty and I'm wondering if you can disable the auto excerpt generation? I know you can do it in PHP but I can't do ...
chocho's user avatar
  • 11
1 vote
1 answer
923 views

Update post / page using API + python

I'm trying to update posts using python and API, the issue that I keep getting code 200 but the post doesn't actually get updated! here is my code: import requests import json import base64 url ='...
Fadi's user avatar
  • 73
0 votes
1 answer
142 views

Custom plugin contact form connecting to mailchimp API

Hi everyone im new to api and i am having a hard time wrapping this code that i got on the internet . i am creating a custom plugin in wordpress and i am trying to connect it to the api using ...
nelson's user avatar
  • 3
1 vote
1 answer
281 views

base64_encode conflict with convert_smilies in wordpress

I am trying to show image in my wordpress website which get from third-party. They give me raw data of image. For showimg image, I need to convert raw data(which get from third-party) to base64_encode....
Mahidul Islam's user avatar
2 votes
1 answer
311 views

Trying to save an object into post meta with wp.data.dispatch('core/editor').editpost

I am using wp.data.dispatch('core/editor').editpost to try and save an object as a value into post meta. I keep getting an error saying. "Updating failed. firstName is not a valid property of ...
David Labbe's user avatar
0 votes
1 answer
648 views

get_body_params() is always empty in POST request

I am registering a custom route like this : add_action('rest_api_init', function () { register_rest_route( 'professeurEQ', 'statistics', array( 'methods' => 'POST', 'callback'...
Valenten's user avatar
0 votes
1 answer
262 views

How get JSON from external API on every page load if not existing in transient?

Clarification: I'm building a site that will show the profiles of different agents (or specialists) in grid based cards. Each of these profile cards will show the online/offline status of the agent ...
Seblito's user avatar
  • 29
0 votes
1 answer
26 views

Plugin index page code executes multiple times

I am developing a plugin that sends emails to users on activation. I am using SendinBlue API for this purpose. Right now, I am testing with just one email address (hardcoded) and static content. The ...
Subrata Sarkar's user avatar
0 votes
0 answers
18 views

Customizer List of Items

I am working with Customizer api for text for example $wp_customize->add_setting('basic-author-callout-text', array( 'default' => '', 'sanitize_callback' => array( $...
askuserahmed's user avatar
0 votes
0 answers
60 views

Export post data with xml to other site using php soap

At one non-wordpress site, I have to show dynamic posts (depends on chosen result), it`s thumbnail, header and short description. Before, I have to fetch these data from other wordpress site. Can I do ...
FrontLand's user avatar
3 votes
1 answer
157 views

Is there a way I can fetch the WordPress Developer Code References with an API?

I would like to fetch the WordPress functions, methods, classes, and hooks from here: https://developer.wordpress.org/ in JSON format. I know that it is a WordPress site, and that I can use WP API to ...
Aristocles's user avatar
0 votes
1 answer
41 views

Building a REST API for your web app exposes primary keys of DB records?

I'm new to WP-REST and need to build a REST API for a wordpress project, but I'm somehow wondering about one aspect. Good practices say, and the built-in WP API for posts also shows, that you should ...
DevelJoe's user avatar
  • 487
0 votes
1 answer
46 views

How to set category correctly for a custom post created by a remote API call?

I'm using a plugin - "cleverness-to-do-list" (https://wordpress.org/plugins/cleverness-to-do-list/#description ). I'm aware that the plugin is closed, but I've updated it at my end and ...
siliconpi's user avatar
  • 113

1
2 3 4 5
16