2021年4月1日星期四

How to get Authorization_code and access_Token and send envelope docusing using asp.net

I am trying to send envelope using docuSign, but having error while get authorization_code which need to get access_Token.

Please help me to get authorization_Code and access_Token.

I am using ASP.Net web forms and .NET framework 4.5.2

  • DocuSign.eSign.dll 5.2.0
  • DocuSign.Integration.Client.dll 1.7.2

Request: https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature&client_id=4f464e25-6425-4ea6-915b-aa9bac5b8ce7&redirect_uri=https://account-d.docusign.com/ds/login?authType=JWT

Response: The redirect redirect_uri is not registered properly with DocuSign

string RedirectURI = "https://account-d.docusign.com/ds/login?authType=JWT";  string ClientSecret = "****";  string IntegratorKey = "****";       Uri oauthLoginUrl = GetAuthorizationUri(IntegratorKey, scopes, RedirectURI, OAuth.CODE, null);       WebRequest request = WebRequest.Create(oauthLoginUrl);   WebResponse response = request.GetResponse();    public Uri GetAuthorizationUri(string clientId, List<string> scopes, string redirectUri, string responseType, string state = null)  {      string formattedScopes = (scopes == null || scopes.Count < 1) ? "" : scopes[0];      StringBuilder scopesSb = new StringBuilder(formattedScopes);      for (int i = 1; i < scopes.Count; i++)      {          scopesSb.Append("%20" + scopes[i]);      }        UriBuilder builder = new UriBuilder("https://account-d.docusign.com")      {          Scheme = "https",          Path = "/oauth/auth",          Port = 443,          Query = BuildQueryString(clientId, scopesSb.ToString(), redirectUri, responseType, state)      };      return builder.Uri;  }  
https://stackoverflow.com/questions/66886063/how-to-get-authorization-code-and-access-token-and-send-envelope-docusing-using March 31, 2021 at 06:31PM

没有评论:

发表评论