I am refering youtube upload document
https://developers.google.com/youtube/v3/code_samples/dotnet
the link given for upload youtube video expecting youube client id and all, but i have created the valid token using following method.
public ActionResult Login()
{
string clientId = ConfigurationManager.AppSettings["v.YouTube.ClientId"];
string redirect = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["x.YouTube.CallbackUrl"]);
string scope = ConfigurationManager.AppSettings["x.YouTube.Scopes"];
return Redirect($"https://accounts.google.com/o/oauth2/auth?client_id={clientId}&redirect_uri={redirect}&scope={scope}&response_type=code&access_type=offline");
}
now i have a valid token, how can i upload video without using the
using (var stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read))
{
credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
// This OAuth 2.0 access scope allows for full read/write access to the
// authenticated user's account.
new[] { YouTubeService.Scope.Youtube },
"user",
CancellationToken.None,
new FileDataStore(this.GetType().ToString())
);
}
method mentioned above.?
is there any way?