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
1
vote
0answers
26 views

Send a post request to a URL on button click

I want to send out app download link via sms when user enters mobile phone number in a field and hit send button. For that I need to capture 10 digit mobile number and send a POST request to the a url ...
0
votes
0answers
10 views

Wordpress Google Calendar Oath 404

I am trying to integrate google calendar with a wordpress plugin. As per the google api documentation I am authorizing using google oauth2. When it returns the code and scope in the url the scope part ...
0
votes
1answer
4 views

woocommerce api echo out response

throw woocommerce api I post a product to wordpress website, but then I want to retrieve the response, for now I want to print only the response. Using php if I use print_r($woocommerce->http) I ...
0
votes
0answers
21 views

Limit the number of external API calls per second

I would like to use wp_remote_post to retrieve data from an external API. The matter is that the external API only accepts a maximum of 5 requests per second. However, depending on how many users are ...
0
votes
0answers
14 views

How to connect WooCommerce website with wholesale website

Our Wholesaler provide us API Key. Now I can get products and import to our WooCommerce. Also via API I can past orders to wholesale shop from our Woo Website. But Can anyone help me, how can i do it ...
0
votes
1answer
21 views

Google credentials and redirect URI for Google OAuth2 in a WordPress plugin, questions

I'm developing a plugin that inserts contacts into a custom table of the WordPress database (name, phone number, email). It is possible to enter data in this table either manually, through a form, or ...
0
votes
1answer
18 views

WordPress Theme/Plugin Information API Response to Text and Button

When requesting to WordPress API for any plugin or theme information for the versions field https://api.wordpress.org/themes/info/1.1/?action=theme_information&request[per_page]=12&request[...
1
vote
0answers
17 views

Add menu items/actions for multisite users who are registered on the network but do not have a role or capability in any sites

We've built a custom application (Pressbooks) that sits on top of WordPress multisite and transforms the multisite into a CMS for book publishing. A frequent flow for super admins is to invite a new ...
0
votes
0answers
13 views

How To Get The Uploaded File In Functions.php and Send The Uploaded File To The API

I am uploading the image and I want to get that uploaded image in functions.php and send it to the API. This is my Image Upload Code That is Added In Page: <form action="" method="...
0
votes
1answer
62 views

Call require_once form admin page with checkbox

I'm creating a custom WP plugin. Inside my main plugin file (functions.php) I've includes the following line of code so a second file (module_2.php) with additional code will be loaded: define( '...
0
votes
0answers
25 views

custom email validation using javascript api with elementor pro and code snippets

I am not very familiar with WordPress and CSS however, my system info is mentioned below: php 8.0.7 wordpress 5.7.2 woocommerce 5.4.1 elementor pro 3.3.1 theme twenty-twentyone my email provider is ...
0
votes
0answers
24 views

Can I overwrite default WordPress Json API For no more pages text

When I call Json API, when there is no more pagination, the response text is The page number requested is larger than the number of pages available. I would like to change that text to custom text and ...
0
votes
2answers
27 views

Is there a way to call via javascript if a user is logged-in on a static html file?

I am using Wordpress/Woocommerce for my website along with jekyll (static html generator). I want to change a button based upon user logged in or logged out. \\ if user is logged in <button>Log ...
1
vote
1answer
23 views

Can Wordpress pass through a call to an external API and return the result directly to the client?

I have a wordpress site that will be replacing an old legacy site, however the old legacy site includes a SOAP API that I won't be able to re-implement in wordpress. Is it possible for the wordpress ...
1
vote
1answer
38 views

trigger WordPress rest any API call

Is there any way to hook all incoming requests for the REST API in WordPress? The reason why I want to trigger all API call...is When API was called I would like to save data depending on parameters. ...
1
vote
1answer
49 views

Display content according to current URL

I want to create most of the website structure based on the external API Manufactures -> Brands Here is how the output of API look like array(2) { [0]=> object(stdClass)#448 (6) { ...
0
votes
1answer
57 views

Validate rest-api call on create

WordPress Site A has an API, which is being used by another system/application (B). B is struggling to handle/controle/sanitize the posts being sent to the API, and often cause creation of duplicates. ...
0
votes
0answers
29 views

Secure WordPress API, how?

I'm writing a plugin that expose a custom resource via WordPress API's. Now the resource is public so anyone knows the API's endpoint can get the resource but I would to secure it, what's the best ...
2
votes
1answer
102 views

WP_REMOTE_POST Requests are being blocked by API provider [closed]

I'm trying to make some API POST requests via WordPress' own method i.e. wp_remote_post() Here is the sample code I'm using: $args = array ( 'sslverify' => false, 'headers' => [ '...
0
votes
0answers
28 views

WordPress Guternberg Content For React Native

I am creating react native mobile app first time. I use WordPress as a WordPress service. Everything is OK excerpt WordPress content from api. As you know, WordPress response Guternberg content block ...
0
votes
0answers
31 views

Wordpress API - Getting just post content

I am trying to get the content from a wordpress page into a file. Is there a way to do this with the API? When I try to use the API, it returns all the content in html instead of text, and I just want ...
0
votes
0answers
62 views

Business SDK Features for Conversions API in WordPress website

I am trying to integrate CAPI or Conversion API within my WordPress site in custom mode via PHP and to do so I am following the following guide: https://developers.facebook.com/docs/marketing-api/...
1
vote
0answers
11 views

Amending REST API function without deactivate/activate plugin every time changes is made

I am working on WordPress development where I have to create a custom REST API in a custom plugin. But every time I am amending the the REST API functions, I have to deactivate and activate the plugin ...
0
votes
0answers
10 views

permissions checking in ajax

My php function which is called with ajax should check if the user which called the function is administrator. So, is_admin() always returns true because it is a admin page. I just thought about ...
0
votes
0answers
9 views

Portfolio items created indefinitely from external API. Every time different number

I am trying to make new portfolio item for every json item from external api. I am working on Wordpress and placed my code in functions.php of the theme used. When i run my code, it creates portfolio ...
1
vote
0answers
29 views

What would be the best way to implement Magic Link logins in WordPress?

On the internet I saw several plugins/services offering a kind of a 'magic login' link functionality. This allows users to sign in without a password but with a magic link. That made me wondering: If ...
0
votes
0answers
33 views

Use the GET method to get the user id from External API and show all user fields

I'm trying to use the wp_remote_get function to make a call to external api, below the process. The frontend user clicks on the edit profile item. wp_remote_get makes a call which returns the id of ...
0
votes
1answer
81 views

How to query a nested field in wordpress api using _fields param

I'm trying to access certain fields which are deeply nested using _fields param which is offered by wordpress. What's wrong with my query? structure of response. { "_embedded" : { ...
0
votes
0answers
16 views

How do I read Jira issues in a WordPress site using OAuth?

We're trying to setup the Jira REST api and are getting hung up on the OAuth authentication process. We followed the Atlassian (Jira) examples for this but they are seemingly outdated and not working. ...
0
votes
1answer
160 views

Woocommerce REST API - add filter to set maximum query per page for product brands [closed]

I'm trying to list all my product brands in a single page, currently i'm able to get only 100 brands per page by using wp-json/wc/v3/products/brands?per_page=100. but if i set per_page=200, i'm ...
0
votes
0answers
44 views

Create a Wordpress Contact Form to call a POST AWS API Gateway and send user data

I am working for a company, and I need to create a Wordpress contact form to call an AWS Api Gateway with a POST Request, but the API function needs to get some parameters: Domain; SecurityKey (each ...
0
votes
0answers
20 views

External API integration in WordPress

I have API URL where I have access key and token along with JSON format. Now I need help as to how to integrate it. My clients need his form leads directly into his API. Below is the code with the ...
0
votes
0answers
22 views

Escape commas in REST API

Sending metadata through the REST API like this, is creating multiple entries because of the commas meta: { plugin_rule_what: 'discount_percentage', plugin_rule_applies_multiple_options:'product_22119,...
0
votes
0answers
24 views

Composer Installed Package with WordPress Rest API Endpoint

I have a WordPress website. I installed composer into my Root Directory before the "www" directory. I installed the Square SDK. I have a WordPress Page which a person enters their C/C ...
0
votes
0answers
14 views

Wordpress API getPosts gives numerical HTML Code

I´m using the REST API from Wordpress to get Posts. Unfortunately there are some characters, which come in numerical HTML Code, like here in the title. GET https:///wp-json/wp/v2/posts { "id&...
1
vote
1answer
47 views

Login WP - Connect single field to an external api

I made a plugin to allow wordpress login with external api. Everything works, now what I have to do is that when a user logs in for the first time, the plugin checks to see if it is already present on ...
0
votes
1answer
225 views

Problems fixing a REST API 404 after Moving my WordPress Directory and updating Permalink Structure

I am running a self-hosted version of WordPress on a Linode VPS running Debian 9. I was previously using WordPress on a /blog directory because I had a basic HTML site that I decided not to keep any ...
1
vote
0answers
28 views

WordPress as GraphQL client

If I'm using WordPress as a front-end for GraphQL that's hosted on another back-end site, what is the best method/plugin I can use to send queries from WP to another server on the backend? If you ...
0
votes
0answers
80 views

Cannot edit post meta fields with rest API

I am using python to send POST requests to /wp-json/wp/v2/< post type >/< post id >. This successfully updates standard fields such as title, content etc. However I am unable to make any ...
0
votes
0answers
37 views

WP Rest API Media Upload is Successful But Returns 500 Error

I was able to successfully upload an image via the WP Rest API using the following code: $this->guzzle_client->post( $this->trailingSlashIt( $this->url ) . $this->...
0
votes
0answers
8 views

How to make a plugin with a simple API that other plugins can use for queries

I'm curious if there is a way to request information from a plugin. For example I have two plugins I've written that incorporate costs for very different features, yet when it comes time for billing, ...
0
votes
1answer
2k views

How can I get all the woocommerce api orders

When I do a get with my postman to https://page.com/wp-json/wc/v3/orders It only returns 10 results, and in woocommerce I have 2000 orders How can I get those 2000 orders?
0
votes
0answers
15 views

Add all post meta data to rest api

I am trying to get all meta fields to automatically add to the rest api. I've found a lot of tutorials that mostly deal with adding specific fields only, not all fields. In the wordpress docs I was ...
1
vote
0answers
27 views

How can I get the media inside a post?

I’m new to WordPress, so please forgive me if my question is not clear or vague. I did a lot of research, but I didn’t figure out how to do the trick. I’m developing a Xamarin application for Android ...
1
vote
0answers
20 views

Create or Update thousands of woocommerce products via PHP

I have client with a cash register in the store. That register has an API from which I'm retrieving over 5000 products and syncing them with online store. I wrote plugin that triggers cron job every ...
0
votes
0answers
17 views

Browser issue during use of woocommerce API

I have created a php page that updates a woocommerce catalog, using both the woocommerce API and the wordpress snippets (wp_update_posts etc). If I process 5 articles at a time, everything works fine. ...
0
votes
1answer
56 views

register/login api

I have been looking all over google and all I can find is fairly old plugins that appear outdated in assisting with an API registration/login. Basically, I have a mobile app that needs to get data ...
0
votes
0answers
430 views

WordPress REST API in Integromat: How to overcome “Sorry, you are not allowed to list users / edit this…”

I am attempting to connect Integromat to my WordPress install. I have successfully enabled visibility of custom post types in Integromat by registering my custom post types with show_in_rest. (And, ...
0
votes
0answers
18 views

I need some assistance opening a few videos in VLC on android automatically from my wordpress site

Im using a dropbox plugin for a few videos and want them to auto open in VLC on android. I just need to pre-pend the vlc:// protocol before the dropbox links. How can I accomplish this automatically ...
0
votes
1answer
25 views

how to create JSON array [] for REST response?

I am trying to create a REST response for a self-developed API in WordPress. The current code is $response = array(); $response[] = array( 'version' => '1.0', 'user' => ...

1
2 3 4 5
14