Nehalkumar
Nehalkumar

Reputation: 219

How to fetch email id from LinkedIn android?

How do I fetch the email address from LinkedIn profile in my Android app?

Upvotes: 1

Views: 2452

Answers (2)

Gustavo Morales
Gustavo Morales

Reputation: 2670

You need to set scope with email permission. After that you will be able to recover that specific data.

private static Scope buildScope() {
    return Scope.build(Scope.R_BASICPROFILE, Scope.W_SHARE, Scope.R_EMAILADDRESS);
}

Then use following URL to make GET request.

String url = "https://api.linkedin.com/v1/people/~:(id,first-name,last-name,public-profile-url,picture-url,email-address,picture-urls::(original))";

With this scope your ApiResponse will retrieve user's email.

Upvotes: 10

Booger
Booger

Reputation: 18725

Did you check the API documentation? From what I can see, there is no way to get the email ID from their API. My guess is that LinkedIn protects this particular information (as they should). If they allowed my personal information to be retrieved by anyone with access to the API I would likely get a lot more spam then I do.

I don't think you can access this information.

https://developer.linkedin.com/documents/people

Upvotes: 0

Related Questions