Getimageappconversation


#1

For https://ads-api.twitter.com/2/accounts/:account_id/cards/image_conversation … Twitter is allowing us to create conversations with any name . It accepts names with just special characters as well .

So if i create a conversation with the name “@@@” it accepts its just fine and is shown as sucessfully created.

But while trying to get the same https://ads-api.twitter.com/2/accounts/:account_id/cards/image_conversation?q=@@@ an error is thrown

{
    "errors": [
        {
            "code": "UNAUTHORIZED_ACCESS",
            "message": "This request is not properly authenticated"
        }
    ],
    "request": {
        "params": {}
    }
}

#2

@arjunsdas95: This may have to do with the way your request is encoded. What are you using to make the request?

It’s successful using twurl:

$ twurl -H ads-api.twitter.com "/2/accounts/18ce54d4x5t/cards/image_conversation?q=@"
{
  "request": {
    "params": {
      "card_type": "image_conversation",
      "account_id": "18ce54d4x5t",
      "q": "@"
    }
  },
  "next_cursor": null,
  "data": [
    {
      "name": "@@@",
      "first_cta": "#new",
      "image_display_height": "96",
      "image": "https://pbs.twimg.com/ad_img/939296597808103425/A5fadTDz?format=jpg&name=orig",
      "thank_you_text": "Thanks",
      "thank_you_url": "https://www.twitter.com",
      "thank_you_shortened_url": "https://t.co/IbqvICOn6F",
      "thank_you_display_url": "twitter.com",
      "preview_url": "https://cards.twitter.com/cards/18ce54d4x5t/53yz4",
      "id": "53yz4",
      "second_cta": "#old",
      "account_id": "18ce54d4x5t",
      "second_cta_tweet": "what",
      "first_cta_tweet": "cool dude",
      "created_at": "2017-12-09T00:53:58Z",
      "image_display_width": "240",
      "card_uri": null,
      "updated_at": "2017-12-09T00:53:58Z",
      "thank_you_dest_url": "https://twitter.com/",
      "deleted": false,
      "card_type": "IMAGE_CONVERSATION"
    },
    {
      "name": "@@@@",
      "first_cta": "#red",
      "image_display_height": "96",
      "image": "https://pbs.twimg.com/ad_img/939297339960725504/vIvQufin?format=jpg&name=orig",
      "thank_you_text": "thanks",
      "preview_url": "https://cards.twitter.com/cards/18ce54d4x5t/53yzb",
      "id": "53yzb",
      "second_cta": "#blue",
      "account_id": "18ce54d4x5t",
      "second_cta_tweet": "blueness",
      "first_cta_tweet": "redness",
      "created_at": "2017-12-09T00:57:09Z",
      "image_display_width": "240",
      "card_uri": null,
      "updated_at": "2017-12-09T00:57:09Z",
      "deleted": false,
      "card_type": "IMAGE_CONVERSATION"
    }
  ]
}

#3

I am using Postman to hit the service which encodes the services in standard utf formats .