Получение запрещенной ошибки при подписке на офисный API - PullRequest
0 голосов
/ 06 марта 2020

Я получаю сообщение об ошибке при попытке подписаться на outlook.office.com/api

Код, который я пробовал:

string requestUrl = "https://outlook.office.com/api/beta/me/subscriptions";
            var subscriptionRequestContent = JsonConvert.SerializeObject(new SimpleStreamingEventSubscription());

            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, requestUrl);
            request.Content = new StringContent(subscriptionRequestContent, Encoding.UTF8, "application/json");
            await provider.AuthenticateRequestAsync(request);
            HttpResponseMessage response = await client.SendAsync(request);

            return await response.Content.ReadAsAsync<StreamingSubscriptionResponse>();

Error : Forbidden

Есть идеи, что может быть не так в этом?

...