Administration

Gold-Vision API

Calling the API with IdentityModel

To send the access token to the API you typically use the HTTP Authorization header. This is done using the SetBearerToken extension method:
// Call api
var client = new HttpClient();
client.SetBearerToken(tokenResponse.AccessToken);

var response = await client.GetAsync("https://your.gold-vision.com/api");
if (!response.IsSuccessStatusCode)
{
    Console.WriteLine(response.StatusCode);
}
else
{
    var content = await response.Content.ReadAsStringAsync();
    Console.WriteLine(JArray.Parse(content));
}


Was this article helpful?

Thank you for your feedback