Read the newest messages of an Instagram account's conversation with one person, newest first. Use it to check a single thread for something you are waiting on, such as a reply or a button tap, without listing the whole inbox.
The answer comes live from Instagram on every call, so a message sent a moment ago shows up straight away.
Path parameters
igsidstringRequired- The person's Instagram-scoped id:
from.idon amessage.createdevent,senderIdon amessage.postback, or the recipient id you sent a message to.
Query parameters
accountIduuidRequired- The connected Instagram account.
profileIduuid- Optional, because accountId names its profile. If you pass both, they must agree.
limitinteger- How many of the newest messages to return, 1 to 20. Defaults to 5.
Each message has its Instagram id, a direction (outbound when the account
sent it), the sender's fromId, its text (null for a message with no text,
such as a photo) and createdAt. When the account has no conversation with the
person, conversationId is null and messages is empty.
Button taps
When someone taps a postback button, Instagram also posts the button's title
into the conversation as a message from them. If a message.postback webhook
never arrives for a tap, an inbound message here whose text equals the
button's title tells you the tap happened.
Errors: 401 unauthorized, 400 invalid_request, 404 profile_not_found,
404 account_not_found, 403 permission_required with missing permission and
reconnect details, 422 connection_expired, 502 provider_error.