November 2015
Intermediate to advanced
152 pages
2h 46m
English
In the previous section, we achieved how to retrieve the access token from the server by passing username and password. Now, with the help of the access token that is received, let's send the authenticated request. The authenticated request will have an Authorization header in the request. We send the request via Fiddler. The request and response is given in the following screenshot:

Fig 16 – Sending Authorized request with bearer token
We can also send a Bearer token in the header using HttpClient in C# code, as follows:
using (var client = new HttpClient()) { var token = "access_token"; client.DefaultRequestHeaders.Add("Authorization", ...Read now
Unlock full access