C# DocuSign';无效的授权';JWT使用C时出错#

C# DocuSign';无效的授权';JWT使用C时出错#,c#,docusignapi,C#,Docusignapi,我刚刚尝试使用docusignapi。我在使用Git上可用的代码运行示例时遇到问题。我已设置所有属性,无法运行任何示例。尝试使用JWT时,我遇到以下异常: 请求服务器时出错,收到一个不成功的请求 HTTP代码已完成,带有响应正文: {“错误”:“授权无效”} this.Host=(Host!=null)?主机:“https://demo.docusign.net/restapi"; this.Username=(Username!=null)?用户名:{my acct email here};

我刚刚尝试使用docusignapi。我在使用Git上可用的代码运行示例时遇到问题。我已设置所有属性,无法运行任何示例。尝试使用JWT时,我遇到以下异常:

请求服务器时出错,收到一个不成功的请求 HTTP代码已完成,带有响应正文:
{“错误”:“授权无效”}

this.Host=(Host!=null)?主机:“https://demo.docusign.net/restapi";
this.Username=(Username!=null)?用户名:{my acct email here};
this.Password=(Password!=null)?密码:{my acct pswd here};
this.IntegratorKey=(IntegratorKey!=null)?integratorKey:{my integrator key here};
this.RecipientEmail=(RecipientEmail!=null)?recipientEmail:{此处为收件人电子邮件};
this.RecipientName=(RecipientName!=null)?recipientName:{recipientName here};
this.TemplateRoleName=(TemplateRoleName!=null)?templateRoleName:“bob”;-诽谤不是我
this.TemplateId=(TemplateId!=null)?模板ID:“cf2a46c2-8d6e-4258-9d62-752547b1a419”;-不是我
this.ReturnUrl=(ReturnUrl!=null)?返回URL:“https://www.docusign.com/devcenter";
this.UserId={My acct GUID HERE};
this.OAuthBasePath=“account-d.docusign.com”;
this.PrivateKeyFilename=“../../../docs/private.pem”;
这个。ExpiresInHours=1;
this.EnvelopedIsList=新列表();
此.IntegratorKeyNoConsent=“66750331-ee4b-4ab8-b8ee-6c1a413a6096”;-不是我
this.PrivateKeyNoConsentFilename=“../../../docs/privateKeyApprovereq.pem”;

任何帮助都将不胜感激!提前感谢

请从示例开始。它是一个可随时运行的VisualStudio解决方案

你检查过这个问题的答案了吗?我在你的代码中没有看到任何实际请求JWT用户令牌的东西,我是否遗漏了什么?但是对于无效的_grant错误,请检查以下答案:check
this.Host = (host != null) ? host : "https://demo.docusign.net/restapi";
this.Username = (username != null) ? username : {my acct email here};
this.Password = (password != null) ? password : {my acct pswd here};
this.IntegratorKey = (integratorKey != null) ? integratorKey : {my integrator key here};

this.RecipientEmail = (recipientEmail != null) ? recipientEmail : {recipient email here};
this.RecipientName = (recipientName != null) ? recipientName : {recipient name here};

this.TemplateRoleName = (templateRoleName != null) ? templateRoleName : "bob"; - DEFALTED NOT ME
this.TemplateId = (templateId != null) ? templateId : "cf2a46c2-8d6e-4258-9d62-752547b1a419"; - DEFAULTED NOT ME

this.ReturnUrl = (returnUrl != null) ? returnUrl : "https://www.docusign.com/devcenter";

this.UserId = {My acct GUID HERE};
this.OAuthBasePath = "account-d.docusign.com";
this.PrivateKeyFilename = "../../../docs/private.pem";
this.ExpiresInHours = 1;

this.EnvelopeIdsList = new List<string>();

this.IntegratorKeyNoConsent = "66750331-ee4b-4ab8-b8ee-6c1a413a6096"; - DEFAULTED NOT ME
this.PrivateKeyNoConsentFilename = "../../../docs/privateKeyConsentReq.pem";