How to call an Authenticated Web Api 2 method

by sunil ravulapalli /18. December 2013 08:28 /asp.net-web-api /Comments (0)

Do a HTTP GET on the this URL

http://localhost:15718/api/Account/UserInfo

with the HTTP HEADER

Authorization: Bearer zt3Ma_gzOxRi53YgCciMe1H1j6Uss.........

The bearer token is from login using http://localhost/token. You can get more information here.

You should get a HTTP RESPONSE 200 with following data

{
    "UserName":"johnsmith",
    "HasRegistered":true,
    "LoginProvider": null
}
blog comments powered by Disqus