issue when trying to fetch resource I got from webhook
Hi, sometimes when I try to fetch the resource (message) that I got from webhook, it returns
USER_ID - is an actual user ID I just do not want to put it publicly , so I've just hide it.
Error fetching message: Client error: `GET https://graph.microsoft.com/v1.0/Users/USER_ID/Messages/AAMkAGQwNzg2MjEzLWQ5N2YtNGIyNS1iZjZjLWEwNDQ3NTY2NTk1MgBGAAAAAADTrAL_ryowRZ0mP3qR1yXbBwBXyHD7-FpMR6r2LGBGwMR-AAAAAAEMAABXyHD7-FpMR6r2LGBGwMR-AAYeQKlTAAA=` resulted in a `404 Not Found` response: {"error":{"code":"ErrorItemNotFound","message":"The specified object was not found in the store., The process failed to (truncated...) )
sometimes the webhook resource url works , sometimes it returns ItemNotFound error
here is the way I fetch the email and how I create subscriptions
/ Subscription data
$subscriptionData = [
'changeType' => 'created',
'notificationUrl' => OUTLOOK_MESSAGES_SUBSCRIPTION_WEBHOOK_URL, // Your webhook URL
'resource' => "/me/mailfolders('inbox')/messages",
'expirationDateTime' => date('c', strtotime('+1 day')), // Maximum of 4230 minutes (under 72 hours)
'clientState' => OUTLOOK_WEBHOOK_CLIENT_STATE // Optional, used to validate notifications
];
$subscription = $this->graph->createRequest('POST', '/subscriptions')
->attachBody($subscriptionData)
->setReturnType(Model\Subscription::class)
->execute();
return $this->graph->createRequest("GET", $resourceUrl)
->setReturnType(Model\Message::class)
->execute();
is there anything I'm doing wrong?