Twitter Lead Generation API


#1

I’m integrating with the Lead Gen Card and I’m having a hard time understanding the best way to get lead information from leads generated from Twitter. What information is available, and what’s the best way to get it programmatically?


#2

Thanks for the question.

It’s not currently possible to get leads via the API in a “bulk download” or REST-ful way yet. On the campaign itself, we only report the number of leads per card (not even per campaign). That said, there are still two options to get the leads:

  1. Download the CSV from our UI.
  2. Specify an API callback endpoint to get the leads in real time.

Regarding #2: For each lead gen card, you can provide a callback URL to accept the leads with along custom parameters. Twitter will then pass all the leads in real time to that URL along with the specified parameters. The parameters from the API callback are:

  • custom_key_name
  • custom_key_screen_name
  • custom_key_email
  • custom_param_{key} - lets you specify custom information coming from your own system in POST/GET payload back to endpoint

The details of this mechanism of the lead generation card are available here:

https://dev.twitter.com/ads/reference/post/accounts/%3Aaccount_id/cards/lead_gen

Let us know if you have other questions!


#3

This topic was automatically closed after 2 days. New replies are no longer allowed.