dsa88886666 2018-05-30 13:19
浏览 48
已采纳

Docu Sign Rest Api集成生产得到ACCOUNT_LACKS_PERMISSIONS错误

Note : Code is working fine with demo account , but we are getting error with production account .

I sent document for online signature by using Rest Api on docusign URL : https://www.docusign.net/restApi/v2. AND Try to create envelope id for that documents. But now i am getting error like .

stdClass Object
(
    [errorCode] => ACCOUNT_LACKS_PERMISSIONS
    [message] => This Account lacks sufficient permissions.
)

I have configured all the required key for production account

DOCUSIGN_USERNAME=xxxxxxxxxxxxxxxxxxxxxx
DOCUSIGN_PASSWORD=xxxxxxxxxxxxxxxxxxxxxx 
DOCUSIGN_ACCOUNTID=xxxxxxxxxxxxxxxxxxxxx   
DOCUSIGN_KEY=xxxxxxxxxxxxxxxxxxxxxx

$documentBase64     =   base64_encode(file_get_contents($input['url']));
        $data       =   "{
                            'status': 'sent',
                            'emailSubject': 'Docusign - ".$input['document_name']."',
                            'documents': [{
                                'documentId': '12',
                                'name': '".$input['document_name']."',
                                'documentBase64': '$documentBase64',
                            }],
                            'recipients': {
                                'signers': [{
                                    'email': '".$applicantEmail."',
                                    'name': '".$applicantName."',
                                    'recipientId': '1',
                                    'clientUserId': '1989'
                                }]
                            }
                        }";   


 $url        =   env('DOCUSIGN_URL')."/accounts/".env('DOCUSIGN_ACCOUNTID')."/envelopes";
 $header     =   "<DocuSignCredentials><Username>" . env('DOCUSIGN_USERNAME') . "</Username><Password>" . env('DOCUSIGN_PASSWORD') . "</Password><IntegratorKey>" . env('DOCUSIGN_KEY') . "</IntegratorKey></DocuSignCredentials>";

 $ch         =   curl_init();

 curl_setopt($ch,CURLOPT_HTTPHEADER,array('Content-Type: application/json', "X-DocuSign-Authentication: $header"));
 curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
 curl_setopt($ch,CURLOPT_URL,$url);
 curl_setopt($ch,CURLOPT_POSTFIELDS,$data);

 $response   =   curl_exec($ch);
 curl_close($ch);
 $response   =   json_decode($response);

 echo "<pre>";print_r($response);die;
  • 写回答

2条回答 默认 最新

  • duanmei9980 2018-06-04 10:21
    关注

    You have to set one of the following base URL instead of https://www.docusign.net/restApi/v2

    For North American account holder :- https://na2.docusign.net/restapi/v2/accounts/{accountId} For European's account holder : https://eu.docusign.net/restapi/v2/accounts/{accountId}

    Notes:- DocuSign hosts multiple geo-dispersed ISO 27001-certified and SSAE 16-audited data centers For more details go to https://docs.docusign.com/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮