Skip to content

POST to the Cards endpoint fails  #181

Description

@andrewjmeier

The Cards endpoint (https://developer.twitter.com/en/docs/twitter-ads-api/creatives/api-reference/cards) appears to be another that requires a JSON body instead of url encoded data.

twurl -H "https://ads-api.twitter.com" "/10/accounts/xyz/cards" -X POST -d '{"name":"SHOJO_1080x1080_002.mp4","components":[{"type":"MEDIA","media_key":"xyz"},{"type":"BUTTON","label":{"type":"ENUM","value":"INSTALL"},"destination":{"type":"APP","country_code":"JP","googleplay_app_id":"jp.intense.ganache","iphone_app_id":"1291823197"}}]}' -A 'Content-Type: application/json'

Here's an example twurl with a working request. (You'll need to include your account ID in the path and a valid media_key.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions