Title: WordPress Webhook and API
Last modified: March 21, 2021

---

# WordPress Webhook and API

 *  Resolved [tsochi](https://wordpress.org/support/users/tsochi/)
 * (@tsochi)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/wordpress-webhook-and-api/)
 * Hi all,
 * I’m currently working on a chatbot integration with my WordPress site. I’m using
   the Google Dialogflow engine and part of the requirements is to have a webhook
   that is publicly available.
    More info here: [https://cloud.google.com/dialogflow/es/docs/fulfillment-webhook](https://cloud.google.com/dialogflow/es/docs/fulfillment-webhook)
 * I’m quite new to WordPress and APIs in general. I understand I can create a PHP
   file in my cPanel and have that as my webhook.
 * My questions are as follows
    1. Is there any plugin I can utilise for the same
   2. Can WordPress API extract data from its database so I can have my API retrieving
   and creating records? 3. How do I achieve the Basic authentication with login
   and password as described in the URL above

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/wordpress-webhook-and-api/#post-14219172)
 * There are existing chatbot plugins.
    [https://wordpress.org/plugins/search/chatbot/](https://wordpress.org/plugins/search/chatbot/)
 * If you wish to add files to modify WP functionality, it should be in the form
   of a custom plugin.
    [https://developer.wordpress.org/plugins/plugin-basics/](https://developer.wordpress.org/plugins/plugin-basics/)
 * A webhook in WP should take the form of a custom API route and endpoint. The 
   endpoint can accomplish anything that’s possible with PHP, so getting or adding
   DB records is perfectly feasible.
    [https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/](https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/)
 * You need a plugin to achieve basic authentication of the API.
    [https://github.com/WP-API/Basic-Auth](https://github.com/WP-API/Basic-Auth)
 *  Thread Starter [tsochi](https://wordpress.org/support/users/tsochi/)
 * (@tsochi)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/wordpress-webhook-and-api/#post-14241582)
 * [@bcworkz](https://wordpress.org/support/users/bcworkz/) thanks for this. I have
   started creating my plugin.

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

The topic ‘WordPress Webhook and API’ is closed to new replies.

## Tags

 * [dialogflow](https://wordpress.org/support/topic-tag/dialogflow/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [tsochi](https://wordpress.org/support/users/tsochi/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/wordpress-webhook-and-api/#post-14241582)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
