Through more experimentation, I found the culprit-
This does not work:
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
This does work:
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
So it was the processing of the data in $data through curl which was causing the permission problem.
Related Posts:
- How do I access the body of a WP API request in a custom route?
- wp rest api v2 return json_no_route
- WP-REST API not returning all its endpoints, 404 on documented endpoints
- WP REST API V2 – Modifying responses
- OAuth signature does not match
- How to upload image to wordpress from external page
- WP API to fetch all records for /posts, /media, /categories
- WP Rest API get page from path
- backbone fetch() not working
- WP-API user email change confirmation
- No featured media in API request
- WP Rest get all by post within that category, by category name not by cat ID
- Add Data to Response of WP-JSON Root
- OAuth1 empty “authentication” in /wp-json
- WP – API – OAuth 1.0a Server, How to implement with AngularJS?
- Are there events pub/sub for external application to subscribe to file/pdf uploads by wordpress admin
- WP API and Proxy
- Get single item from cURL plugin API call inside bash [closed]
- why woocommerce api only do not upload images from local computer? [closed]
- ng-repeat is not returning a list of posts
- What request is WordPress sending on theme update?
- Is WP API going to be around in the long term?
- How to Create a Post from localfiles?
- Get a complete list of all categories using node-wpapi
- upload image to wp-api
- WP-API call function
- wordpress api make 2 custom post type with single request
- Update Custom Post Type Metadata Wp Rest API
- WP-API Content showing null
- How to retreive/set wordpress page html?
- How can I use React packages with the clasic editor?
- Hiding WordPress REST API v2 endpoints from public viewing
- Show popular post in another php website via WP REST JSON API
- WP-API v2 Custom Endpoint Response Formatting
- How do I cache (core) API requests?
- How to update/insert custom field(post meta) data with wordpress REST API?
- How to save new transients if query changes?
- How to loop through JSON data in wordpress WP REST API
- WP API V2 returning Invalid User ID
- WP-API: how do I allow authenticated clients only?
- WordPress wp-json API – Custom Post Type returns 403
- Add media with WP-Rest-API v2 II
- wordpress custom endpoint multiple params
- Can we access the REST request parameters from within the permission_callback to enforce a 401 by returning false?
- Create post with REST API in php with file_get_contents
- WP-API and Basic Auth returning 403 on POST but not GET
- WordPress API returns empty page when page is less than X-WP-TotalPages
- WP Rest API max limit include parameter?
- How to filter users on custom meta fields in WP JSON v2?
- Passing Meta array in wp-rest api
- How to make a WP REST API query with meta_query in WP4.7?
- How to retrieve custom meta term of category taxonomy from WP Rest API?
- Gutenberg Custom Block Getting All Posts
- Inserting custom post meta value using WP-REST API
- Get all tags not just first 10 with wp api 2.0
- Mass importing json data into custom fields (postmeta)
- How to add WP API and JS featured image attachment
- WP REST API V2 – Add user data to response
- How to quickly reorder posts in the admin panel that will persist for the wp-api
- Why a strange discrepency between get_current_user_id() when using AJAX versus output of document.cookie?
- get_post_type_object() does not work with switch_to_blog()
- Create a range slider to change font-size with different screens sizes in wordpress customizer api
- is it possible to filter a rest api endpoint by using a registered rest field?
- WordPress API for search
- Update a post based on results from GET request to another server
- WP API post__not_in is not working
- WP API: Get posts excluding those with a tag or category name
- How to replace a function using a child theme?
- rest_no_route on custom API endpoint wordpress
- How can I list all installed plugins/themes/versions from CLI/API?
- Media gallery images url instead of ID on WP API Response
- WP REST API. Configuring JSON routes
- How to create WordPress custom end point with multiple parameters?
- WordPress REST Api get posts by ID
- How to run wp cli from a wp hook?
- How to use Python to create a Post in WordPress?
- update_callback is not working in register_rest_field
- WP REST API and Access-Control-Allow-Origin
- What WP-API authentication method should I use to interact with anonymous / not-logged visitors?
- Outputting HTML elements through WP-API
- How to make an API call to a custom post type but filtering by meta value?
- Cant create or update meta fields using WordPress REST API
- Flatten Responses returned via WP REST API via WP_Error for obfuscation
- WordPress REST API – get custom taxonomy category posts
- Check if user can in javascript
- CallBack URL for payment gateway redirecting to homepage instead of executing callback function
- Remove unwanted fields from WP API response
- How to add a post’s view count into the WordPress API response
- WordPress API “code”:”rest_no_route” with Custom Route
- Adding Amchart Interface to WordPress API
- Deleting media using the WordPress Rest API
- Create Posts from API response without duplicates
- Consume legacy rest api dependent upon WP API plugin
- Hiding WordPress REST endpoints from public viewing using Basic Authentication
- Should I edit a user meta field with PUT, PATCH, or POST and WP::Editable
- WP-API + JS Backbone client – how to update post meta
- API request forbidden when requesting from same domain
- External api call using wordpress
- Woocommerce API for calling products by Category ID
- wordpress rest api authentication failed