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. ...

learn more… | top users | synonyms

0
votes
1answer
27 views

Building own plugin cache when using external API

I've built a plugin using a third party API in order to receive data which will be shown on the frontend. Until now I've stored the data by using transients. When someone visits a single post/page ...
-1
votes
0answers
11 views

rest_api_init not registering namespace or route

I've been battling with adding an endpoint to my code. Several endpoints are registered and liste in the namespace list at /wp-json/ "namespaces": [ "wp/v2", "oembed/1.0", ...
0
votes
0answers
8 views

wp_remote_request to execute “DELETE” method in Zoho subscription

Hi I need to execute this in wordpress website DELETE https://subscriptions.zoho.com/api/v1/customers/{customer_id} but I can't find WP_remote api function that would directly trigger DELETE. I find ...
0
votes
1answer
21 views

How do I query my Wordpress posts on another HTML page using the Wordpress Restful API?

I have a fully functional Wordpress site and I want the to create a new separate website that displays the posts from the wordpress site using the Wordpress Rest API. I understand that typing ...
0
votes
0answers
19 views

Accessing Woocommerce products via WP REST API [closed]

I have successfully accessed posts and pages via the WP Rest API(Version 2.0-beta13) using http://example.com/wpr/wp-json/wp/v2/posts http://example.com/wpr/wp-json/wp/v2/pages I have Woocommerce ...
0
votes
1answer
13 views

Getting a Page via its post-name using WP REST API v2 and Postman

Using Postman as a Chrome extension I have had success accessing Pages(not posts as I don't use them) from my WP website. Having trouble pulling data using the post-name url that I set way back in ...
1
vote
1answer
629 views

How to use REST API over CURL with authentication?

I am trying to use the WordPress Rest Api with authentication to get more data from the API. I have installed the Oauth plugin, rest-api plugin, and gotten API credentials from WP-CLI. I have ...
0
votes
1answer
311 views

Authenticating a user with the WP-API V2 in Postman

I'm using Postman to test my project and the wp-api. More specifically POST requests where a user must be authenticated to do something. Here's what I'm working with to create a user: ...
0
votes
0answers
24 views

Fetch api json data pagination

I'm developing a plugin that needs to fetch all font families list from Adobe Typekit API. I'm using wp_remote_get to accomplish this. $font_list = array(); $fonts_lib = wp_remote_get( ...
0
votes
0answers
610 views

Is there any way to Integrate WordPress with Imgur for Image Hosting

I wanted to use Imgur for hosting all my WordPress website images. Till now I know how to integrate Imgur with a simple form using an upload script. The process is well explained at Subin's Now what I ...
0
votes
1answer
6 views

REST or Alternative Method for New User && New Site && Assign User to New Site as Admin?

Looking for a method to add a new user to a site, assign them to that site as an admin. API does not seem to support this. Any functions I should be looking at as alternatives?
0
votes
0answers
26 views

REST API And Error Codes - No Message

I'm writing some code which inserts a new post and some postmeta using AngularJs and the REST API. I'm filtering the rest_pre_insert{postype} hook which is allowing me to throw an error when the ...
-1
votes
2answers
468 views

Wordpress SMS API integration without plugin

I am struggling with SMS sending in WordPress without plugin, I have a, API, but that API is not working. Example: function mysite_woocommerce_order_status_processing( $order_id ) { ...
0
votes
1answer
2k views

wp_insert_post not working for custom post type?

For whatever reason wp_insert_post doesn't work for a custom post type. Here's the code snippet I'm using. $new_post = array( 'post_type' => 'rsp_synonym', 'post_title' => ...
0
votes
0answers
11 views

Options of accessing wordpress data from mobile app

There is an existing wordpress website and I would like to make native app(probably will do crossplatform native with React Native as I have experience with it) for it. So my question is: is there an ...
1
vote
0answers
16 views

Authenticate with a Rails app?

There seems to be lots of posts where another app / website uses a WP website to authenticate against. I am looking for the opposite. I have a Rails app that uses Devise for authentication. I have a ...
0
votes
0answers
81 views

Custom route for WP-API gives “rest_no_route” value

I am following this tutorial to create custom end points to WP-API . I am always getting this error on hitting /wp-json/custom-plugin/v2/get-all-post-ids/ on postman to test : { ...
0
votes
1answer
48 views

Develope REST API using Wordpress for Android app [closed]

I am an Android developer and new to WordPress. Requirement : is to write rest APIs to Login and get User details after login. All the plugins and wp-rest apis only expose core functionalities and ...
0
votes
0answers
28 views

Upload media Remote or Api

I couldn't find any accurate answers, therefore asking here. I have a website that runs multiple cron jobs in WordPress and generates posts from multiple resources with images and descriptions. I am ...
0
votes
1answer
69 views

WordPress API - count posts

Is there a way to count the number of posts / pages via the WordPress API? I'm wanting to insert a post then check, using the API, that the count has gone up by 1. I've looked at ...
0
votes
0answers
27 views

Flexslider+Vimeo APi in WP

I created a custom post type using flexslider. It supports video (vimeo/youtube) and images. It works but I need to add the vimeo api (froogaloop) because I need: The video to automatically stop ...
0
votes
0answers
30 views

Customizer API - trigger refresh manually

Is there a way to trigger refresh of live preview manually from js file? I have tried wp.customize.instance('some_setting_id').previewer.refresh() ...
0
votes
0answers
24 views

How to integrate Netller payment gatway on wordpress?

I am trying to integrate Netller payment gatway but it's throwing an error on execution. Can anybody help me to resolve this issue. What I have tried so far is: $username = 'myusername'; $password = ...
0
votes
0answers
23 views

How can i create a signup form in my mobile app with WP REST API v2?

I'm builgind a native mobile app and i want users to sign up to my WordPress site using WP REST API. How can i implement this function securely into my app? I found a create user endpoint in the ...
0
votes
1answer
531 views

Best way to hook a custom url?

Let say I've a custom page with slug created "/products", I want user will be able to POST to a form with url "/products/create" and allow us to render some JSON output. The "/products/create" page ...
0
votes
1answer
61 views

body_class REST field in WP-API

I'm building a site with WP-API (v2). I'm attempting to add a REST field according to documentation that includes anything from body_class. However, body_class is returning either one class (one ...
0
votes
0answers
103 views

Authentication for a mobile app connected via wp-rest api?

Building a cordova (HTML/JS) based mobile app (not-native) and I want to use wordpress only as the backend. The idea is that mobile app users will be making requests to the API and custom endpoints ...
0
votes
1answer
67 views

Why aren't tags and categories added in post request to WP Rest API

I'm using V2.0 and trying to create a post using the /posts endpoint. Here's the payload being sent with my request: var payload = { title : "some title", format : "link", tags: ...
0
votes
0answers
72 views

How can I display products from an external API on my Woocommerce (WordPress plugin) based site?

I have a created a new eCommerce store using WooCommerce WordPress plugin. Now, I want to display products from an external site using their API. I've got access and required authentication to their ...
0
votes
0answers
112 views

Create new product with woocommerce REST API with javascript (clientside)?

Is it possible to create new products in woocommerce using its API with javascript from clientside? I tried this for getting all products: endpoint: ...
-1
votes
1answer
74 views

Zoho subscription API to Wordpress [closed]

Please help me to integrate ZOHO subscription api to Wordpress without using any plugins. Project process would be: 1. Wordpress: The user can choose product and it's add on in the form options. I ...
1
vote
1answer
765 views

API for creating blogs on Multisite?

Is there some API or plugin that allows for creation of sites on a multisite install? Jetpack doesn't seem to allow it, and the xml rpc doesn't seem to support multisite. Is there something I can use ...
0
votes
0answers
30 views

Refresh the Customizers preview after editing fields

I'm using ACF fields on a few custom widgets. While using the Customizer to edit fields, they will save on change but the preview will not refresh. Calling wp.customize.previewer.refresh() will ...
0
votes
0answers
15 views

Choosing what Shortcodes should render

So I am working on a mobile app that pulls from a WordPress JSON API, I've coded our own end point and it's delivering content just fine. I need a way to be able to pick and choose what shortcodes ...
21
votes
4answers
16k views

Programmatically add a Navigation menu and menu items

Through API functions, I want to define a new Navigation menu, select it in the current theme, and then insert a few Pages as menu items. This is to be done for instance on a theme activation. ...
0
votes
1answer
56 views

how to get nonce using json api

I try to open this url in my browser or calling from my frontend application: http://78.47.177.214/blog/api/get_nonce/?controller=posts&method=create_post i keep getting the response ...
2
votes
1answer
271 views

How do I use the WP REST API plugin and the OAuth Server plugin to allow for registration and login?

Are there any example projects that do the same? I want to be able to login and register for accounts on my site via the API.
0
votes
1answer
234 views

Users credentials and syncing from third party with WooCommerce

I am trying to build a web store for a client who has already had a mobile app. the mobile app team would like to sync user's password as they update it both on the mobile app and the web store. ...
3
votes
1answer
297 views

Is it possible to enqueue the Youtube API script or does it have to be inline?

The code below is the main part of a function in my functions.php which returns a div and script which ultimately output a youtube API iframe to the template where the code had been called from. At ...
0
votes
1answer
13 views

Surrogate ID for posts, is there an alternative field in the posts table?

I am copying some content between another CMS and Wordpress. I need to keep track of the original Id because I might have to update the copied content in the future. The old CMS will still be used for ...
5
votes
1answer
232 views

how to authenticate for the REST API from a plugin and from command line

I want to try the new REST API but I'm not used to this kind of things. Basically, I want to use it to GET custom posts via ajax and show on the website frontend (I'm building an ajax product ...
0
votes
2answers
72 views

Where to put API Code?

I want to use some of the Wordpress API built in functions such as wp_remote_request(). I have tried using this in a php file in my root Wordpress installation but I am just getting an error: ...
1
vote
1answer
43 views

Using API to generate short link

I want to use a shortcode that generates a short URL from API of Premium URL Shortener script. I added code from API to my template functions: // Main Function function shorten_url($url){ ...
0
votes
0answers
125 views

Access Control Allow Origin problem with CORS

I'm at wit's end. We're using CORS to go back and forth between a .NET environment and a WP/BuddyPress environment. I've added the Access-Control rule to the header in index.php, with no wildcard. ...
0
votes
0answers
36 views

how to display term name angularjs

I've recently learned about angularjs and I am trying to display a term associated with a specific custom taxonomy. So far this is what I've tried in my partials file - <div ng-repeat="post in ...
1
vote
0answers
106 views

WP set auth cookie using Ajax is not saved to browser

We are creating an external dashboard that uses Wordpress data, obviously, we use WP REST API v2 We want total separation from the traditional WP Dashboard, but we also want to log in user "behind ...
1
vote
1answer
56 views

REST API: How can I restrict a custom post type to only be accessible by authenticated users?

I have a custom post type configured to be accessible via the WP Rest API v2. How do I lock the access to this custom post type so that only the authenticated users can perform GET requests?
0
votes
0answers
26 views

Best practice for pulling in data from simple 3rd party API

We have a simple template in our WP site that will display a list of companies. Each company has 4 attributes (ID, name, logo, category/industry). We have been provided with an outside api ...
0
votes
0answers
65 views

How do I establish a connection between Firebase user database and WordPress?

I'm making a Website and an android app. The android app stores its user details i.e., username and password on Firebase database; I'm also making a website and I want a login in the website which ...
0
votes
1answer
47 views

WordPress.org Support Forum API

WordPress.org provides several API end-points for data about themes and plugins. For example for plugins there is the plugin_api: https://developer.wordpress.org/reference/functions/plugins_api/ And ...