I'm doing the following with no success:
using (HttpClient client = new HttpClient())
{
string checkIfAccessTokenIsValidUri = "https://api.box.com/2.0/users/";
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", boxAuth.AccessToken);
var request = await client.PostAsync(checkIfAccessTokenIsValidUri, null);
}
I tried to also add the client_id and client_secret to the headers, but it did not work - response.StatusCode is always Forbidden.
Any help would be appreciated.