Hello, I am attempting to retrieve all cards generated for a line_item_id.
When i call
/0/accounts/xxxx/lead_gen
i get
{“request”:{“params”:{}},“errors”:[{“code”:“ROUTE_NOT_FOUND”,“message”:“The requested resource could not be found”}]}
I am getting oauth success and have successfully created the cards through the same api interface.
Any assistance would be greatly appreciated.

That error indicates that the API resource you tried to access is not a valid API endpoint. In this case, you’ve missed the “/cards/” in the URL.

A query to see all cards on an account would use the GET accounts/:account_id/cards/lead_gen endpoint, and would look something like this:

https://ads-api.twitter.com/0/accounts/abc123/cards/lead_gen

Note that there is a bug in that documentation, and you cannot limit the results of the cards by line_item_id, since that is not an attribute of a card. We’ll fix that documentation bug.

1 Like

the documentation also omits the"/card/"
Thank you for the response