Gmail API using .NET C# with Source Code (Reading mails and Attachments)

preview_player
Показать описание

Gmail API v1 Application
2) Create a Console application in Visual Studio 2019
3) Authentication to Gmail API using C# code.
4) Gmail API Scope for accessing mails.
5) Read mails & its nested mails.
- Mail Subject, Body, Date, From Email address 5) Read Attachments files of an email using Gmail API

1) Create Google Project.
2) Create OAuth Consent Screen for Application.
3) Enable Gmail API.
4) Create OAuth 2.0 Client Id to access Gmail API.

1) Create a Console Application in Visual Studio
2) Create a “GmailAPI” Console Application in Visual Studio 2019
Open NuGet Package Manager Console & run this below command.
Install-Package Google.Apis.Gmail.v1

Gmail API Scope
GmailService.Scope.MailGoogleCom2) GmailAddonsCurrentActionCompose
3) GmailService.Scope.GmailAddonsCurrentMessageAction
4) GmailService.Scope.GmailAddonsCurrentMessageMetadata
5) GmailService.Scope.GmailAddonsCurrentMessageReadonly
6) GmailService.Scope.GmailCompose
7) GmailService.Scope.GmailInsert
8) GmailService.Scope.GmailLabels
9) GmailService.Scope.GmailMetadata
10) GmailService.Scope.GmailModify
11) GmailService.Scope.GmailReadonly
12) GmailService.Scope.GmailSend
13) GmailService.Scope.GmailSettingsBasic
14) GmailService.Scope.GmailSettingsSharing

Thank you
Everyday be coding
Рекомендации по теме
Комментарии
Автор

Thank you so much, it was exactly what I needed. For those who may receive error message, that app has not been verified, you should add your user as tester, then you will be given possibility to continue

td
Автор

Thank You ! :) I was looking for a good C# example on how to read Gmails. This is a very good starting point ! Best to you !

getsmartpaul
Автор

Great video series!! A good thing to note here is that this flow is for desktop apps and won't work for web apps because they rely on a redirect URL to be specified.

martinafourie
Автор

thank you for this very particular tutorial! kudos to you !

rickyryancabriles
Автор

a thousand of particulars 🤭
how about if I will run this program in particular server side like azure functions? how will that "this app isn't verified" still pop up?

Michael-fllh
Автор

Thank you so much! It helps me a lot, but I have a query that in MsgNestedParts there should be str += MsgNestedParts insteas of return MsgNestedParts?

hemalpatel
Автор

how do i get my
when i run the sample code it gives me error that
Error 400: redirect_uri_mismatch
and my localhost:portherethe number keeps changing
idk how do i add localhost:numberhere cause it keeps changing please help

cold_aim
Автор

Thank You! This video has helped me so much. 🙂

Chetanaandhemavardhan
Автор

When did you add the OAuth 2.0 credential for the desktop, or does it do it by default when you enable the api? In the video it looks like it was there already.

mattmarkus
Автор

unable to open borweser at 16:46
please help me out in this

jawadurrehman
Автор

This is a Console App or an MVC Project I mean which project template you are using on Visual Studio for makin this project

DivyanshuRai-ue
Автор

Does anyone try to open the attachment downloaded? I downloaded some Excel & Words files from the emails by the program. All of them are fail to open. They are corrupted files.

kchho
Автор

IList<MessagePart> parts = message.Payload.Parts;

44:30 in video
on running
parts = null exception occurs, any body have faced such exception or solve it or can tell me how to resolve it

jawadurrehman
Автор

Would you be interested in an updated version of your code? I have done some refactoring. PS: Thanks for the introduction. It got me started on the right track.

JacoDeVilliers
Автор

thank for this awesome tutorial, now how can i send mail using this particular process

riazripon
Автор

Hi need help setting this app as web service. Was able to run this in the desktop but was not able to run on web server. How to setup oauth to run on web?

indianking
Автор

Excellent

Can you share the video to send mail

Thanks

mdaslamknl
Автор

Hey, is it possible to get inbox size directly (Number of emails at inbox)

AbuTaher-vxoe
Автор

hi, i hope you can see my comment
everthing woks fine in locql butonce its in IIS or server web is no longer okay
i get what is the problem but can you give me a simple solution, the ones i saw need made me more confuse, hope you can answer me i am really stuck here and cant move one

amoujddem
Автор

particular particular particular particular video

AlexandrPinchuk
welcome to shbcf.ru