what is the URL referring to for webhook?

  • Unknown's avatar

    Hi,
    I just realised today that WordPress has a Webhook function. Could you let me know if the URL refers to the endpoint of my wordpress site that I have to create or it is referring to the endpoint at the site that I want to make my post appear in should I choose page_publish as the parameter?

    Basically, my aim is to trigger an action such that whenever I publish something on wordpress it will push the same content to my twitter account or facebook etc. Hope to hear from you soon.

    Tks

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there,

    I’m not too familiar in terms of the details of Webhooks, so I’ll tag WordPress.com staff to help with that.

    In regards to what you’re trying to do, have you considered using the Publicise feature? I see you’ve made a recent thread on an issue regarding it, but it may be able to help achieve what you’re wanting to do, in a way which is a lot less complicated than Webhooks: https://en.support.wordpress.com/publicize/

    The only downside (if it counts as that) is that it’ll publish a tweet/post with the title (or the custom text you select) and the URL to the blog post. It won’t publish the full blog post. Are you trying to do that?

    If you are, you may want to consider a service not used by WordPress.com. For example, an alternative which I can think of off the top of my head is you could use Zapier’s integrations with RSS feeds and whichever service you want to use: https://zapier.com/apps/rss/integrations

    Note: Zapier isn’t associated with WordPress.com or Automattic, but I’ve used it before and it works well

    Let us know if you have any further questions or issues. :)

  • Hi @tangara888, we have a reference on webhooks here:

    Webhooks

    You might also like our Rest API:

    REST API

    But, like @torres126, I’d recommend Publicize… mainly because we know the work that goes into keeping these services running smoothly 😉 But you’re welcome to do whatever works best for you. Cheers!

  • Oh, and while I haven’t used the webhooks myself, I understand the URL is the address of the program you wrote that will handle the HTTP POST request. Hoping that helps :)

  • Unknown's avatar

    Hi torress126,

    I wish to have the full content published to facebook page and not just the tag so if webhook can do it, I’d like to learn more how this can be done. Hope someone from WordPress.com can assist on this.

    Can Zapier integrate with WordPress.com ?

  • Unknown's avatar

    Hi,

    If you’re wanting to use Zapier, you’d be able to do what you’re intending using RSS feeds. WordPress.com automatically gives you an RSS feed, yours is this: http://hi5tutors.wordpress.com/feed/

    If you wanted to have the full content published on Facebook, you could use this zap: https://zapier.com/apps/rss/integrations/facebook-pages/39/share-new-blog-posts-to-your-facebook-page

    And you mentioned Twitter, so you might want to use this zap, which will post the content of your post as an image: https://zapier.com/apps/rss/integrations/twitter/1446/post-new-rss-feed-items-as-twitter-image-posts

    Here’s some things to note:

    • Your feed URL, which it will ask for, is http://hi5tutors.wordpress.com/feed/
    • When dragging the boxes into what you want posted (when creating the second action/step), the actual content of your blog post will either be defined as “Description” or “Content”
    • Unlike Publicise which is close to instant, there’s a bit of a delay (up to 5 minutes whilst you use the free trial given by Zapier, and then up to 15 minutes after that)
    • There isn’t any need to use Webhooks with this method!

    Zapier also have a good help page regarding RSS feeds if you get stuck: https://zapier.com/help/rss/

    But feel free to write back if you have any further questions or issues. :)

  • Unknown's avatar

    Hi torrest126,

    I just found out Zapier is not free and that is not what I want.

    Please let me know the answer to my first question when I first posted about this webhook.

    Basically, I need to know when I write my webhook, does your site accepts Java ?

    Also, there is no user access toaken access verification etc. from wordpress.com so how does the whole thing work then ?

    I’ll be working with Heroku which provides free hosting.

  • Unknown's avatar

    Hi,

    In regards to Zapier, it should be free (you don’t need to enter any card details). You’d be restricted somewhat in the sense you can only make 5 zaps and there’s up to 15 minutes in delay.

    However, I completely understand to you’re wishing to use Webhooks as an alternative. I’m not too familiar with this though, so it’s probably best to wait for a WordPress.com staff member to answer those questions, and they should be able to help you out within a few hours.

    Thank you. :)

  • Hi @tangara888, we wouldn’t be able to write a program for you — as I mentioned Publicize is plenty for us to manage here.

    But you can look out on the web for examples and learn from those! All of our documentation is in the links above.

  • Unknown's avatar

    I believe I did not ask how to code but I was asking about the url end point.

    Knowing the url end point does not equip one to run the code!

    As you know, you need to know what parameters to extract ect to meet what you want to do, for my case – it is the page content.

    And we do not set all these API, it has to come from the provider.

    There was no documentation and also the latest reply from torres then it become more clear where lies the documentation.

  • Unknown's avatar

    Is it free ? I read up the documentation which is what I am looking for.

    It seems that only student can do it for free and in order to run our webhook, we have to convert our .com site to .org.

    Is that right ?

    Please confirm.

    Tks.

  • Hi there,

    There is no charge to use either the WordPress.com API or the webhooks built into WordPress.com. Where exactly do you see that it’s only available for students?

    We’ve provided you with the documentation on our API and webhooks, but we’re not able to provide support for implementing those, or using them to post to another service via that service’s API. We only provide end-user support in this forum, and what you’re doing is development work.

    I suggest you try a developer forum like https://wordpress.stackexchange.com/ if you need more help with how to use these tools.

  • The topic ‘what is the URL referring to for webhook?’ is closed to new replies.