Outlook REST API is returning 404 for event in message - outlook-restapi

I have the following case:
I use the Outlook REST API (without any library) to visualize the users' emails - including Event invites. First, I make a call to get only the message properties and if the message has MeetingMessageType value, then another request is sent to:
https://outlook.office.com/api/v2.0/me/messages/<messageId>?$select=Microsoft.OutlookServices.EventMessage/MeetingMessageType&$expand=Microsoft.OutlookServices.EventMessage/event($select=Id,SeriesMasterId,iCalUID,Type,CreatedDateTime,LastModifiedDateTime,WebLink,Calendar,Start,End,IsAllDay,IsCancelled,Organizer,Attendees,Location,Subject,ResponseStatus,OnlineMeetingUrl,Recurrence,ResponseRequested)
to get the Event information and provide the customer with the option to respond to the invite.
The problem:
Since yesterday one of our clients reported that he can't see the event information. It turns out that the request for getting this information is returning 404.
The response body:
{
"error": {
"code": "ErrorItemNotFound",
"message": "The specified object was not found in the store., The process failed to get the correct properties."
}
}
The event is shown in the Outlook desktop mail client.
The client also shared that they have enabled ATP (advance threat protection) at his company. Not sure if this can have anything to do with the problem.
I see that other clients also have this problem.
Update:
I asked the user to try the following requests from the Outlook sandbox:
https://outlook.office.com/api/v2.0/me/messages/<messageId>
This request returns the EventMessage with "MeetingMessageType": "MeetingRequest".
Then when he tried accessing the Event:
https://outlook.office.com/api/v2.0/me/messages/<messageId>?$select=Microsoft.OutlookServices.EventMessage%2FMeetingMessageType&$expand=Microsoft.OutlookServices.EventMessage%2Fevent
The Outlook REST API returns 404.
For me, the same formatted requests work, so I can't really understand what is going on.
Please, any information will be well appreciated!

Related

Create and send an envelope from a template in docusign restapi v2.1 issue

I have created postman request to create and send envelop from template.
After sending it's returning this error
HTTP Error 400. The request URL is invalid.
Here is my postman request data
URL:https://demo.docusign.net/restapi/v2.1/accounts/xxxxxxxx/envelopes
Method: POST
Body:
{
"templateId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"templateRoles": [
{
"email":"test#gmail.com",
"name":"Tester",
"roleName":"signer3"
}
],
"status":"sent"
}
What can be the issue?
Here is the documentation link
I see nothing wrong above. You can see the full How to send an envelope with a template article.
Please confirm your accountId is correct where you have xxxxxxxx.
Please also see if you can use any URL for API calls.
A 400 error indicates there was something going on with the request. Can you turn on your API logging and see if you can reproduce the error? I agree with Inbar, I don't immediately see anything out of alignment. https://support.docusign.com/en/guides/ndse-user-guide-api-request-logging
If you could send the resulting log file along with a copy of your template to matt.king#docusign.com we can have a closer look.

Send Direct Message using Twitter API does not work

I am trying to send Direct Message to a user who I follow and who follows me.
When I first tried to make a POSTMAN request as per the document here I was getting a HTTP 415 response, media type not supported. I looked up the Error code in their document and understood that this was happening because the callback_url needed to be whitelisted.
So I followed this guide to whitelist the callback_url and generate the access_request token , i.e oauth_token and oauth_secret here
So, was :
1. Get successfully oauth/request_token and got the Response: &oauth_callback_confirmed=true for the callback_url configured my app details. As far as I could tell, that's all I thought, I needed to do to whitelist the callback_url
2. Got oauth_verifier and final oauth_token and oauth_token_secret
But, after generating the outh_token and oauth_token_secret and using it to make the DM API call, Now I am getting
{
"errors": [
{
"code": 32,
"message": "Could not authenticate you."
}
] }
When I try to make a GET auth/authenticate call as documented here, I get a HTTP 403 with a message
Whoa there!
The request token for this page is invalid. It may have already been
used, or expired because it is too old. Please go back to the site or
application that sent you here and try again; it was probably just a
mistake.
I can see in the Documentation that https://api.twitter.com/1.1/direct_messages/events/new.json
Requires authentication? Yes (user context only)
I think I am missing something. Can anyone please help me point in the right direction as to what I need to be able to send DM to users successfully ?
I was also getting this error just now, I regenerated my API Key & Secret for the account and the Access Token & Secret for the application and then my POST request worked correctly.

Getting 'Invalid envelope status' resending documents through Docusign API

I am re-sending documents via the API. This has worked for a long time, and suddenly started getting these errors? I can't figure out what is going on? Does anyone have any ideas?
The actual envelope status is 'Waiting on Others', which of course is not in the list below, but we need to resend the envelope, because the user never got the email. So how do I deal with this?
{ "errorCode": "ENVELOPE_INVALID_STATUS",
"message": "Invalid envelope status. Envelope status is not one of: Created, Sent, Delivered, Correct." }
EnvelopesApi envelopesApi = new
EnvelopesApi(GetBasePath(myAccount.BaseUrl));
envelopesApi.Configuration.AddDefaultHeader(
"X-DocuSign-Authentication", JsonConvert.SerializeObject(myHeader));
EnvelopesApi.UpdateRecipientsOptions options = new
EnvelopesApi.UpdateRecipientsOptions();
options.resendEnvelope = "true";
envelopesApi.UpdateRecipients(myAccount.AccountId,
EnvelopeId, docuSignRecipients, options);
You're not showing what the docusignRecipients value is.
I suggest you first obtain the recipients object via EnvelopeRecipients::list and then use it in the call.
Also, at the API level, there is no envelope status of Waiting on Others. I suggest you also obtain the envelope status so you can see what is going on.
I'm sorry to hear that your code was working and then stopped. That would indicate a regression test problem. Does your code still work on demo?

Fetching a public page's posts doesn't work while it works in other pages

For a project, I need to get some public pages' posts.
I have 105 pages I need to get posts from and my program works fine with the most of them, but not with one.
When I use my app's access token it gets me what I want, except when trying to get posts from one page, "Yaakov.Perry".
When I send a request to this page, the server sends me this error:
"error": {
"message": "Unsupported get request. Object with ID 'Yaakov.Perry' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
Also, while my app's access token works for every page except this, the access code that the graph api explorer generates works for every one (including it).
Does any one know why this problem happens and how to fix it?

OneNote API intermittently returns HTTP 400 when querying O365 SharePoint SiteId

My code calls the OneNote API to resolve a SharePoint Online site URL to a SiteCollectionId and SiteId. We get a bearer token, set the HTTP auth header and issue a GET request to:
https://www.onenote.com/api/v1.0/myorganization/sitecollections/FromUrl(url='https://mytenantxyz.sharepoint.com/sites/copynotesite')
For approx a week, it has been returning the expected response, similar to:
{
"#odata.context": "https://www.onenote.com:576/api/v1.0/$metadata#Microsoft.OneNote.Api.SiteMetadata",
"siteCollectionId": "111e03ac-468c-4a28-9aab-543098ef49bb",
"siteId": "555d72a0-f82f-4e4c-ae8a-17ef0ea04f32"
}
However, today it has decided to return the following in approx 9 out of 10 requests:
{
error": {
"code" : “20158”,
"message": "Unable to get SiteMetadta for the url specified in the request.",
"#api.url": "http://aka.ms/onenote-errors#C20158"
}
}
The Microsoft docs (link) explain error 20158 as:
"Unable to get metadata for the site URL specified in the request. Check the format of the supplied URL. Supported formats include https://domain.sharepoint.com/site-a and https://domain.com/sites/site-a. (SharePoint support is in Preview.)"
I was unaware that this was in preview any more (I thought it was GA), but anyway it doesn't explain why it intermittently works for exactly the same input (same URL and bearer token).
Could it just be a bug in the OneNote API or SharePoint API that it must call under the covers?
Please refer to the blog - http://blogs.msdn.com/b/onenotedev/archive/2015/06/11/and-sharepoint-makes-three.aspx
We added the FromUrl method so you can pass in an absolute site URL and get the site collection and site IDs. You should make this call only when needed, and then store the values (site collection and site IDs) for future use in your requests to the OneNote API.
this however does not answer intermittency. Please share the X-correlationId header with us for a failing request so that we can help further.

Resources