Webhooks Setup

Twitter Webhook

14min
through pathfix automation, you can enable user webhook listening for all your user that have connected their twitter account via pathfix oauth twitter webhook will catch all events that are listed here and will only work for twitter 1 0 (the webhook for twitter does not support twitter v2 yet for oauth 2 0) the following documentation will guide you on how you can setup your twitter account and setup twitter webhook listening for all your connected users setup in pathfix oauth before proceeding, make sure you have setup your twitter integration in pathfix oauth and have added the connect button for your users to be able to connect their twitter accounts configure your twitter integration in pathfix oauth add the script tag to add the connect button in your application to allow your users to authenticate their twitter accounts (detailed documentation for pathfix oauth can be found here ) setup in pathfix automation create a blank automation by clicking on design and selecting new design give your first task a name to save the automation (autosave) click on the test and publish tab and click on test to run a test on the automation on successful completion, click on publish to live click on endpoints and copy the endpoint url for use in the webhook setup live endpoint is for live environments and dev endpoint is for testing/development click on webhooks from the top navigation and click on create new select twitter from the list of provider webhooks paste the endpoint url copied from the automation into the callback url section add your twitter environment name (this is the environment name as per your twitter developer app) to view environments go to products premium dev environments ( click here to check your environments) make sure you pick the account activity api environment if you do not have account activity api, create a new one add the twitter client secret (this is the consumer key's api secret of your twitter developer app, not the oauth 2 0 client secret) click on the pathfix oauth tab and enter your pathfix oauth public key and private key add your pathfix user id (user your pathfix oauth login email here) click on save to save the settings on the webhooks page, click on activate against twitter to activate your webhook the webhook activation will take a few minutes and will happen in the background (click on refresh on the top navigation to refresh the page) once activated, the webhook status will turn green testing your webhook setup we recommend running a test on your webhook setup to make sure the setup is right to do this go to your pathfix oauth account and click on test connection for twitter (make sure you have setup twitter and not twitter v2) click on re connect and connect a twitter account on successful connection, the automation will start listening for changes in twitter for the connected user you will see the webhook user count increase (if it doesn't increase at first, click on refresh on the top navigation) go to your twitter account and post a test tweet go to your pathfix automation account and click on monitor you should see the test event created would have triggered a webhook call your test is successful configure your automation now that your webhook has been setup successfully, you will need to copy the payload sent by twitter and captured by pathfix automation and create your automation here are the few initial steps to get you going copy the request received from our test event go to the automation created and paste the request into the call data (json) section of the first task from here, you can call an api, run a condition or process the data as you please through the automation important any changes made to the automation will need to be done in the dev environment once changes are made, you will first have to test the automation and on successful completion then publish to live please note, without publishing to live, the changes will not go into effect few points to note on the json the pathfix user id is the same user id that is sent via the pathfix oauth system this generally is the current users unique id the data section of the json is the exact data that is sent by the provider need help? reach out to our support via support\@pathfix com or live chat through your pathfix dashboard