I’m facing an issue with the Instagram Graph API. A day ago, I successfully replied to a comment and sent a DM without any problems. However, after replying to a total of 106 comments, I started receiving this error when trying to send DMs:
"The thread owner has archived or deleted this conversation, or the thread does not exist."
I can still reply to comments, but I’m unable to send DMs. I've tried multiple approaches, but the error persists.
Here’s the error response for reference:
error: {
message: 'The thread owner has archived or deleted this conversation, or the thread does not exist.',
type: 'IGApiException',
code: 100,
error_subcode: 2534001,
fbtrace_id: 'ARmNpr-Ma3GfRPrQecjksw8'
}
Code
export const sendDirectMessage = async (
ownerId: string,
commentId: string,
message: string
) => {
try {
// https://developers.facebook.com/docs/instagram-platform/instagram-api-with-instagram-login/messaging-api/private-replies
const { data } = await axios.post(
`https://graph.instagram.com/${ownerId}/messages`,
{
recipient: { comment_id: commentId },
message: { text: message },
},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${instagramAccessToken}`,
},
}
);
return {
status: 200,
message: "Direct message sent successfully",
resData: data,
};
} catch (error: any) {
const errorMessage = error.response ? error.response.data : error.message;
return { status: 403, message: errorMessage.error.message };
}
};
Has anyone encountered this issue or have any ideas on what might be going wrong? I’d really appreciate any insights!
Thanks!
same here!
same here!
Same problem. I ask Meta representatives to give a detailed answer
Hi, did you get any response from meta representative?
No. I'm still waiting for an answer