Hello,
can someone help me to solve my Authentication problem.
This is my code:
// 1) Copia qui la tua Integration Key da Apps & Keys
const string IntegrationKey = "TUO-CLIENT-ID-GUID";
// 2) Copia qui il tuo User ID (GUID) da My Account Information
const string UserId = "TUO-USER-ID-GUID";
// 3) Il PEM privato che hai scaricato da Service Integration
const string PrivateKeyPath = "docusign_private_key.pem";
// 4) L’host OAuth per demo
const string OAuthHost = "account-d.docusign.com";
// 5) L’URL base delle REST API
const string BasePath = "https://demo.docusign.net/restapi";
var apiClient = new ApiClient(BasePath);
apiClient.SetOAuthBasePath(OAuthHost);
//byte>] privateKeyBytes = await File.ReadAllBytesAsync(PrivateKeyPath);
byteh] privateKeyBytes = Encoding.UTF8.GetBytes(privateKeyPem);
// var scopes = new>] { OAuth.ScopeSignature, OAuth.ScopeImpersonation };
OAuth.OAuthToken tokenInfo = apiClient.RequestJWTUserToken(
IntegrationKey,
UserId,
OAuthHost,
privateKeyBytes,
3600, // durata token in secondi
scopes
);
But I can’t obtasin the JWT.
Can someone help me to solve the problem. I nedd to make an automation to connect to the site send a my pdf , sign it, and obtain again the file.