How to fetch user information in MVC5 from google API through access_token which token provided by the mobile end into web API? [Used Code][1]: https://i.sstatic.net/D2hfW.png
HttpClient client = new HttpClient();
var urlProfile ="https://www.googleapis.com/oauth2/v1/userinfo?access_token=" + model.Auth;
client.CancelPendingRequests();
HttpResponseMessage output = client.GetAsync(urlProfile).Result;
if (output.IsSuccessStatusCode)
{
string outputData = output.Content.ReadAsStringAsync().Result;
}
Getting Error: If I am using above code to fetch user information by access_token
{
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}
}