-
Notifications
You must be signed in to change notification settings - Fork 218
Webhooks
linvi edited this page Aug 11, 2018
·
6 revisions
A webhook is a http callback. You send to Twitter the url of an http server
and Twitter will use that url to execute requests that will represent different events.
It means that you no longer need multiple streams to handle multiple users but just a single server that Twitter can communicate with to send you live updates.
To use webhooks with Tweetinvi, you will need to use the following nuget package :
You can read the official Twitter documentation for working with webhooks here.
In a very short summary what you need to do is the following :
- You need to request access to a premium Twitter account. You can register to get such an account on https://developer.twitter.com/en/apply
- After you have been approved you will be able to go to Dev Environments.
- There you will be able to create a free
Account Activity API Sandbox
environment.
You can find all the endpoints available in the Tweetinvi.Webhooks
static class.
RegisterWebhookAsync(string webhookEnvironmentName, string url, ITwitterCredentials credentials)
Register a webhook to one of the environments you have.