I am trying to access Google API using dotNet SDK. When I don't have API restriction, I can just access and get JSON using the following code. I can still access with IP address restriction. But when I want to use with application restriction, I have to provide Package Name and SHA-1, which I already generated.
I just don't know how to provide this header info when requesting API get. There are several ways to implement the credentials. By using the service account, I only need to provide email and private key, but I don't want to use OAuth access. Please let me know if there is the best way to implement it.
var youtubeService = new YouTubeService(new BaseClientService.Initializer()
{
ApiKey = "****",
// HttpClientInitializer = credential,
ApplicationName = "*****"
});