Héctor León
Héctor León

Reputation: 31

How to get all contacts (sender, to, cc, etc) from a specific email using Outlook REST API with JavaScript?

I need to get all the contacts involved in a specific email (sender, to, cc, etc) then access to their job title, company, primary and mobile phone numbers using Outlook Rest API 2.0 with JavaScript.

I got the token and everything and so far I've been successful in getting all contacts using this:

https://outlook.office.com/api/v2.0/me/contacts

But I don't want all contacts from the whole mailbox, I just want the contacts from a specific email and get the data described above.

Any ideas on how to achieve this will be appreciated A LOT!!

Thanks in advance guys!!

Upvotes: 0

Views: 481

Answers (1)

haridevelops
haridevelops

Reputation: 35

checkout the below link.

https://learn.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/mail-rest-operations#get-messages

Response from the API has the sender object which has Sender, From, ToRecipients, CcRecipients, BccRecipients, etc.

Upvotes: 0

Related Questions