Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No message exists with the id *id*

Tags:

rest

mandrill

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!

like image 870
user2354664 Avatar asked Sep 28 '22 13:09

user2354664


1 Answers

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.

like image 162
terrorbox Avatar answered Oct 26 '22 23:10

terrorbox