No message exists with the id *id*

空扰寡人 提交于 2019-12-02 00:12:09

问题


I'm trying to list sent emails via the mandrill API. I can list them fine by calling https://mandrillapp.com/api/1.0/messages/search.json. This gives me a list that contains a bunch of sent messages along withg an id field. I then use this ID field when calling https://mandrillapp.com/api/1.0/messages/content.json (need to know some of the content). It gives me the following response:

{ status: "error" code: 11 name: "Unknown_Message" message: "No message exists with the id 'id goes here'" }

This is when I'm pasting IDs from the list. Also, I've tried it with both recently sent emails and those that were sent months ago. It's always the same.

What am I doing wrong?

Thanks a lot!


回答1:


Depending on when you're making the messages/content request, the content may not be indexed just yet, or might fall outside of the time range for how long they store that info.

For example, right after you send the email it probably takes a bit for the content to get indexed. So if you're sending, searching, then calling messages/content in the span of a few minutes, you may get that error.

And message content is only stored for 24 hours by default unless you pay for more, so if you're calling messages/search after the 24 hour period is up, you'll get the same error.



来源:https://stackoverflow.com/questions/31000046/no-message-exists-with-the-id-id

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!