download gmail contacts - c#

There are lots of script like invite friends script which requests users to provide their google/other account id and password and automatically downloads all email accounts and sends an email invitation automatically. So, how to download email address using ASP.NET C# by providing login details?

Use the Google contacts API.
Here is a .NET example of retrieving contacts
Good luck :)

You have a special API for that. Try Googling for it. Can can find the best. Else u can use open invite or email invite 2.1

Related

email client c# for O365 without Azure App Registration

does anybody know if it is possible to create an email client app which retrieves mails from a O365 account via MS Graph without registering the app in Azure AD?
I think there must be, because how could email apps like the in-built email on the iphone connect to O365 accounts without this? There, I enter my email adress, password and one time (each 90 days) my token which I received via phone (and what I think is cached somewhere?)
Any hints or tips are highly appreciated.
Thanks in advance.
The client can send some request header showing they are authorized, but if the app (for eg: email app) sends the same request header, it will be rejected unless it's registered.
Thank you Md Farid for the comment, In most cases, Microsoft Graph API also need required permission along with token.
The below document involves manually registering an app with the Azure AD, using OAuth 2.0 On-Behalf-Of flow
https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow

Ionic Facebook Login logic

im working on an app using ionic and Rest api with .net core
for the login and register it works fine
but when im thinking about adding social login and register using facebook and google i cant get the logic for saving my infos in my DB
for exemple facebook can give me email, picture, name .. but not password
if a new clinet sign in to the app how i can save the infos to database without password ?
and how i can log in with facebook and pick the user data from database without a password and using only an email.
i need only the logic for this or any example
thank you
This is definitely not the best answer but what I did in a previous app was to use Firebase to handle Facebook login. Then you can store the UID in your DB.
Another resource that I haven't looked at, but you could check out is this Microsoft doc.

Using gmail for login through asp.net?

I have searched in this site but more of gmail login were related to php.
my problem is connecting gmail login to the website written in C# and asp.net. so the user can enter the website by gmail account. I dont talk about sending email and these areas. its just login in with gmail account! should I write it myself from the beginning? or there is some ready APIs / plugins ??
Thanks
Please see the following link which details the login API for using their Google accounts https://developers.google.com/accounts/docs/OpenID
You might want to try http://www.dotnetopenauth.net/
look the following thread for more details
OpenID and Google.GData.AccessControl.dll in C#
How to do login to my asp.net app using Facebook (or other ID)?

Windows Live / Hotmail retrieve Contacts' Emails

after I did some research on the subject, I found that Windows Live stopped providing email addresses for a user's contacts through its API. Instead, they provide the email hashes.
I did a little more research, and i found many websites being able to retrieve the contact list for a user and displaying it (with emails, not hashes) but the difference is that i don't think they are using oAuth since to retrieve the emails, the user must provide his email/password.
I need to implement importing a user's contact list on my site and i see no workaround to doing it using oAuth REST requests through Live's API (granted that i was being able to get the access token and make other REST requests).
If not using oAuth, what are other ways of getting a Windows Live/Hotmail contact list?
I ended up using Windows Live ID's Delegated Authentication. Even tho it's deprecated it'll have to do until i find a more effective solution.

Not getting facebook email

I'm using the Facebook C# SDK for build an website with some facebook integration and I'm having some problems with getting the email from an facebook user.
I ask for these permissions:
email,user_birthday,user_about_me,user_relationships,publish_stream,offline_access,user_location
And when asking for fields I ask for these:
id,first_name,middle_name,last_name,picture,email,birthday,location,gender,friends,bio
This is allready live an in most cases there is no problem at all. But in some cases about 1/100 I don't get the email field but all the others fields are there.
Do any one know how this can happen?
I tested with different privacy settings and with multiple facebook accounts.
Ole Dallerup Sørensen
Just like you said, some people have their privacy settings set up so that Facebook proxies any emails to them. This means despite them granting you the permission you will still not get their email address.
I found an solution to my problem for now.
Instead of using the graph api I run an fql query and this gives me the email.
the fql:
SELECT email FROM user WHERE uid = me()

Categories