Get Welcome Message Object (direct_messages/welcome_messages/show) doesn't exist?


#1

Ran both the example found at

https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/get-welcome-message

and

twurl -X GET /1.1/direct_messages/welcome_messages/show.json?id=(myownid)

and got page not found.

What’s up?


#2

Hi @bobber205.

I’ve used twurl -X GET /1.1/direct_messages/welcome_messages/show.json?id=ID with an ID not associated with the current default account. It returned

{
  "errors": [
    {
      "code": 34,
      "message": "Sorry, that page does not exist."
    }
  ]
}

I used twurl set default LIVEScheduleBot COSUMER_KEY and sent the request again.

Got this Response

{
  "welcome_message": {
    "id": "991466352434073606",
    "created_timestamp": "1525218973631",
    "message_data": {
      "text": "Welcome to @LIVEScheduleBot! Wondering what content Twitter has streaming LIVE?\n\nSelect any one of the listed program categories to find out! #GoLive https://t.co/xw28bLAqcC",
      "entities": {
        "hashtags": [
          {
            "text": "GoLive",
            "indices": [
              142,
              149
            ]
          }
        ],
        "symbols": [],
        "user_mentions": [
          {
            "screen_name": "LIVEScheduleBot",
            "name": "LIVE Schedule Bot 📺",
            "id": 869377376903454700,
            "id_str": "869377376903454720",
            "indices": [
              11,
              27
            ]
          }
        ],
        "urls": [
          {
            "url": "https://t.co/xw28bLAqcC",
            "expanded_url": "https://twitter.com/messages/media/991466352434073606",
            "display_url": "pic.twitter.com/xw28bLAqcC",
            "indices": [
              150,
              173
            ]
          }
        ]
      },
      "attachment": {
        "type": "media",
        "media": {
          "id": 969669924065968100,
          "id_str": "969669924065968128",
          "indices": [
            150,
            173
          ],
          "media_url": "https://ton.twitter.com/1.1/ton/data/dm/969669927991832580/969669924065968128/jqck9hpO.jpg",
          "media_url_https": "https://ton.twitter.com/1.1/ton/data/dm/969669927991832580/969669924065968128/jqck9hpO.jpg",
          "url": "https://t.co/xw28bLAqcC",
          "display_url": "pic.twitter.com/xw28bLAqcC",
          "expanded_url": "https://twitter.com/messages/media/991466352434073606",
          "type": "photo",
          "sizes": {
            "thumb": {
              "w": 150,
              "h": 150,
              "resize": "crop"
            },
            "large": {
              "w": 1920,
              "h": 1080,
              "resize": "fit"
            },
            "medium": {
              "w": 1200,
              "h": 675,
              "resize": "fit"
            },
            "small": {
              "w": 680,
              "h": 383,
              "resize": "fit"
            }
          }
        }
      },
      "quick_reply": {
        "type": "options",
        "options": [
          {
            "label": "🗓️ Daily & Weekly Streams",
            "metadata": "parentNode:fTRTUvMj-originalID:tXUVUOql"
          },
          {
            "label": "🏈 Sports Streams",
            "metadata": "parentNode:fTRTUvMj-originalID:v9YIRPUu"
          },
          {
            "label": "➕ Other Streams",
            "metadata": "parentNode:fTRTUvMj-originalID:kEas90GR"
          }
        ]
      }
    },
    "source_app_id": "12251146"
  },
  "apps": {
    "12251146": {
      "id": "12251146",
      "name": "Proxima Iris",
      "url": "http://www.proxima.io/iris"
    }
  }
}

I would imagine that the issue you’re having is caused by either the wrong account set as default or you’re using the wrong Welcome Message ID.


#3

Yep you’re totally right.
I was using the RULE id not the message object’s id.

Thanks!