【问题标题】:How to retrieve production environment endpoint如何检索生产环境端点
【发布时间】:2017-05-15 16:36:48
【问题描述】:

我上周已经认证了我的集成商密钥,并确认它在上周五“上线”。 阅读this documentation,我现在需要确定我链接到哪个生产站点。问题是当我按照说明操作时,我看不到我链接到哪个网站:

*The {SERVER} value is determined by where your DocuSign Production account resides.
The easiest way to determine this is to login to your Production DocuSign account and
examine the prefix of the URL. For example, if the URL is:
https://na2.docusign.net/Member/Home.aspx, then replace {SERVER} with “na2” to find
your Production endpoints.

任何帮助将不胜感激

有没有办法从信封中检索生产 URL?

envelopeApi.GetEnvelope() ?

【问题讨论】:

    标签: docusignapi


    【解决方案1】:

    使用Login_Information API 检索您的 BaseUrl。

    这是使用C# SDK的代码

    string _username = "<Add your User Name>";
    string _password = "<Add your Password>";
    string _integratorKey = "<Add your Integrator Key>";
    string DOCUSIGN_URI = "https://www.docusign.net/restapi";
    string _authHeader;
    
    public string Init()
    {
         _authHeader = "{\"Username\":\"" + username + "\", \"Password\":\"" + password + "\", \"IntegratorKey\":\"" + integratorKey + "\"}";
        // initialize client for desired environment (for production change to www)
        ApiClient apiClient = new ApiClient(DOCUSIGN_URI);
        Configuration.Default.ApiClient = apiClient;
    
        Configuration.Default.AddDefaultHeader("X-DocuSign-Authentication", _authHeader);
    
        // we will retrieve this from the login API call
        string accountId = null;
    
        /////////////////////////////////////////////////////////////////
        // STEP 1: LOGIN API        
        /////////////////////////////////////////////////////////////////
    
        // login call is available in the authentication api 
        AuthenticationApi authApi = new AuthenticationApi();
        LoginInformation loginInfo = authApi.Login();
    
        // parse the first account ID that is returned (user might belong to multiple accounts)
        accountId = loginInfo.LoginAccounts[0].AccountId;
    
        string baseUrl = loginInfo.LoginAccounts[0].BaseUrl;
        // Update ApiClient with the new base url from login call
        apiClient = new ApiClient(baseUrl);
    
        return accountId;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-14
      • 1970-01-01
      • 1970-01-01
      • 2020-11-23
      • 2021-03-30
      • 1970-01-01
      • 2016-11-24
      • 1970-01-01
      相关资源
      最近更新 更多