I am trying to create a console program that gets all of the Envelope EmailSubject's from the last day.
I am having trouble with consent and I keep getting the error:
DocuSign.eSign.Client.ApiException: 'Error while requesting server, received a non successful HTTP code Completed with response Body: {"error":"consent_required"}'
I get this message after running the following code:
var apiClient = new ApiClient();
string ik = _configuration.IntegrationKey;
string userId = _configuration.UserId;
string authServer = _configuration.AuthServer;
string rsaKey = DSHelper.ReadFileContent(DSHelper.PrepareFullPrivateKeyFilePath(_configuration.PrivateKeyFile));
OAuth.OAuthToken authToken = apiClient.RequestJWTUserToken(ik,
userId,
authServer,
Encoding.UTF8.GetBytes(rsaKey),
1);
I understand that I need to "Grant consent to an internal application" using the DocuSign Admin portal steps found here: How to obtain admin consent for internal applications/
However, even after adding my application to the connected app list, I am still getting the "{"error":"consent_required"}" error.
Any help would be greatly appreciated!