Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
150 views
in Technique[技术] by (71.8m points)

Why are there multiple MessageSID permutations in the Twilio Message response?

This is a more general question for trying to understand why there are what appear to be 3 different permutations of essentially the same key-value in the vanilla Twilio api response back either when a message resource is returned or webhook'd to a third party application.

Here is the abridged JSON response returned to a requesting client:

//mock message id values
{ "SmsMessageSid": "MM2fb7744c9a752cb554b4a6371c6756d8",
  //... abridged
    "SmsSid": "MM2fb7744c9a752cb554b4a6371c6756d8",
//...abridged
    "MessageSid": "MM2fb7744c9a752cb554b4a6371c6756d8"
}

Google surfaces a support doc on MessageSid, but nothing else is clear on the data dictionary for the other two properties.

My questions are:

  1. Why are there 3 keys with the same value?
  2. Are there any instances in which those values would be different for any of the keys?
  3. Which key-value should I persist if I want to save the id for this specific message?
question from:https://stackoverflow.com/questions/65894805/why-are-there-multiple-messagesid-permutations-in-the-twilio-message-response

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This may help:

SMS Request Parameters

MessageSid A 34 character unique identifier for the message. May be used to later retrieve this message from the REST API.

SmsSid Same value as MessageSid. Deprecated and included for backward compatibility.

Use MessageSid


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...