2013-11-04 49 views

回答

1

请通过DocuSign Dev Center,因为在整个网站有一些非常有用的信息,包括您正在寻找的确切的SOBO(发送代表)步骤。

前往开发中心 - >探索 - >功能 - > SOBO。一般来说这些步骤,你需要采取:

  1. 获取用户1(认证用户)的访问令牌
  2. 获取用户2为一个访问令牌(操作用户 - 您发送代表这个人的)代表用户2

的确切要采取的步骤,你需要潜在的帐户设置,请参阅开发中心的这个页面

  • 发送请求到已经打开:

    http://www.docusign.com/developer-center/explore/features/sobo


    总结页面解释什么,这里有答案也一样,下面是详细信息:

    第1步:

    POST https://{server}/restapi/{apiVersion}/oauth2/token 
    
    Accept: application/json 
    Content-Type: application/x-www-form-urlencoded 
    Content-Length: {length of body} 
    
    grant_type=password&client_id={IntegratorKey}&username={email}&password={password}&scope=api 
    

    确保您提供您帐户的电子邮件,密码和集成商密钥。

    成功响应返回以下JSON:

    { 
        "access_token": "<access token for user>", 
        "scope": "api", 
        "token_type": "bearer" 
    } 
    

    STEP 2:

    此处添加了头Authorization: bearer <access_token>其中<access_token>是在步骤1中返回和电子邮件中的标志是现在您想要代表的用户的电子邮件地址:

    POST https://{server}/restapi/{apiVersion}/oauth2/token 
    
    Authorization: bearer <access token> 
    Accept: application/json 
    Content-Type: application/x-www-form-urlencoded 
    Content-Length: {length of body} 
    
    grant_type=password&client_id={IntegratorKey}&username={$emailOnBehalf}&password={password}&scope=api 
    

    结果是另一个访问令牌,我们假设它是12345

    第3步:

    现在你可以在您的签名请求,利用以下AUTH头代表此用户发送:

    Authorization: bearer 12345 
    X-DocuSign-Act-As-User: $emailOnBehalf