Title: Processing 3rd Party POST requests in WP
Last modified: February 3, 2024

---

# Processing 3rd Party POST requests in WP

 *  [kspambot](https://wordpress.org/support/users/kspambot/)
 * (@kspambot)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/processing-3rd-party-post-requests-in-wp/)
 * My website will receive POST requests from another site on the internet, when
   a users data needs to be processed. Is there an example of WP registering to 
   receive external POST requests from the internet and processing them using PHP?
 * Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/processing-3rd-party-post-requests-in-wp/#post-17396288)
 * Requests can be processed by any of the usual WP entry points. Any of the API
   endpoints could be used. A specific page with a custom template could be used.
   admin-ajax.php and admin-post.php are possibilities. You can also define your
   own custom API route/endpoint.
 * Which is best to use depends on what sort of request is being made and what sort
   of response is expected. If the transmitted data is all in JSON format, an API
   endpoint is likely the best choice. If you’re able to specify an URL query string(
   or an “action” POST field) as part of the request that the 3rd party uses to 
   access your site, then admin-post.php would be a good entry point when non-JSON
   data is involved.
 *  Thread Starter [kspambot](https://wordpress.org/support/users/kspambot/)
 * (@kspambot)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/processing-3rd-party-post-requests-in-wp/#post-17396313)
 * I will be getting a small amount of data with the POST. I will check on admin-
   post.php. Thank you.
 * K-
 *  Thread Starter [kspambot](https://wordpress.org/support/users/kspambot/)
 * (@kspambot)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/processing-3rd-party-post-requests-in-wp/#post-17407590)
 * bcworkz, Thanks for your help. I am having some trouble with this. Can you explain
   how you register for receiving an external HTTP POST request and responding to
   it? I would be glad to pay for the help. Thanks.
 * K-
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/processing-3rd-party-post-requests-in-wp/#post-17410416)
 * While I appreciate your willingness to compensate for assistance, such offers
   are not allowed by our forum guidelines. Allowing such a practice can lead to
   unpleasant consequences so we need to disallow even the very best of well meaning
   intentions. Additionally, I advise ignoring any cold call offers of paid assistance
   that might arise from your considerate offer here. If you do need paid help, 
   I recommend jobs.wordpress.net. You will not find me there, but you will find
   experts willing to help you.
 * How you’d set this up varies by what service you’re involved with. It’d be best
   if you checked that service’s documentation and support for specifics. Typically
   they provide information about the format of their request and what they expect
   in return, if anything. You provide them with an URL for where their request 
   should be sent, for example `https://example.com/wp-admin/admin-post.php?action
   ="foofoo"`
 * You’d write an action callback function hooked to “admin_post_foofoo” or “admin_post_nopriv_foofoo”
   that handles whatever needs to be done. Emphasis on “typically”. YMMV.
 *  Thread Starter [kspambot](https://wordpress.org/support/users/kspambot/)
 * (@kspambot)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/processing-3rd-party-post-requests-in-wp/#post-17415317)
 * Thanks for your help
    -  This reply was modified 2 years, 2 months ago by [kspambot](https://wordpress.org/support/users/kspambot/).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Processing 3rd Party POST requests in WP’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 5 replies
 * 2 participants
 * Last reply from: [kspambot](https://wordpress.org/support/users/kspambot/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/processing-3rd-party-post-requests-in-wp/#post-17415317)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
