Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Outlook.com REST API

I am making an UWP app somewhat like Cortanium in which i want to get the mails of the current user's account. For that i have chosen the REST API from outlook.com. But the problem is i don't know from where can i get started. I want to get the user's e-mails and then read it to the user.

I have seen the article which shows the API calls that can be made and tried but i am getting this error:

{"error":{"code":"OAuthMissingForThisAccount","message":"Authentication for this account must be using OAuth."}}

So what do i have to do in order to get a proper response ?

(P.S:I am new in the REST API world so correct me if i am wrong anywhere)

like image 248
HarsiddhDave Avatar asked Mar 08 '26 13:03

HarsiddhDave


1 Answers

From your error info, I think it's possible that you didn't handle the user authorization.

For every request to the Mail API, a valid access token is needed. To get this access token, you can refer to Register and authenticate your app.

In this doc:

To use the Outlook REST API to access a user's mailbox data, your app should handle registration and user authorization:

  1. First, register your app to get access to the Outlook REST API. You can then implement the API calls in your app.

  2. At runtime, get authorization from the user and make REST API requests to access the user's mailbox.

like image 57
Grace Feng Avatar answered Mar 10 '26 02:03

Grace Feng