Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Whenever an event is triggered, it is sent to the app in one of two ways

  • Either they are sent to the App Service URLthe Event Listener URL.
  • Or they may be sent to a widget or the browser (in the form of a URL query parameter)

Some events like app.install can only be sent to the app serviceevent listener URL, whereas others like client.pressButton (that are triggered in response to user actions in Flock), can be sent either to the app service or event listener or to a widget or browser URL, depending on how the corresponding integration was configured. See Can any event be sent a to widget or browser URL? for a list of these events.

Anchor

...

EventListenerURL

...

EventListenerURL
Receiving Events on the

...

Event Listener URL

The app service sets up the app service URL,  event listener URL is an HTTPS endpoint that you provide this URL while creating the app in the dev dashboard. Events are sent to this URL in the form of an HTTP POST request with a JSON body. The app may choose to process certain events and ignore others.

For example, if the callback URL is https://example.com/events, the HTTP request as shown in the listing below is sent to the app.

...

The headers X-Flock-Event-Token provides an event token that has been signed with the app secret. Your app can use it to verify that the request did indeed originate from Flock.

...