0

In the DocuSign eSignature API Integration, to get the OAuth access token, we are supposed to pass two parameters code and grant_type as per their API Specification.

The Parameter code is the resultant of the below url that I am loading everytime in the browser and copying and pasting. The other parameter grant_type is a static string.

URL to generate the code

https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature&client_id={my-client-id}&redirect_uri=https://www.example.com/callback

so, whenever I load this URL in my browser, the redirection will happen to a new page and the browser URL will show like this below.

https://www.example.com/callback?code={unique-code}

Now, everytime, I am copying this unique-code and specify in my Web Application as a part of my developement in the code input parameter.

But, in real time, how to fetch this code so that I can integrate in my asp.net C# application.

Nivas Pandian
  • 416
  • 1
  • 7
  • 17

1 Answers1

1

Get URL parameters from a string in .NET answers this question for C#, let me summarize:

Use this code:

string param1 = HttpUtility.ParseQueryString(myUri.Query).Get("code");
Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23