我无法通过Api创建信封。
执行授权没有错误。
$ options = new \ DocuSign \ eSign \ Api \ AuthenticationApi \ LoginOptions(); $ loginInformation = $ authenticationApi-> login($ options);
我得到这个回应:
LoginInformation {
#container: array:2 [
"api_password" => null
"login_accounts" => array:1 [
0 => LoginAccount {
#container: array:11 [
"account_id" => "xxxxx"
"account_id_guid" => null
"base_url" => "https://na2.docusign.net/restapi/v2/accounts/xxxxx"
"email" => "xxxxx@xxxxxx.com"
"is_default" => "true"
"login_account_settings" => null
"login_user_settings" => null
"name" => "xxxxxxx, LLC"
"site_description" => ""
"user_id" => "xxxxxxxxxxxxxxxxxxx"
"user_name" => "xxxxxx Contracts Team"
]
}
]
]
}
但是当我尝试以这种方式创建信封时:
$ envelopeApi-> createEnvelope($ this-> config-> getAccountId(),$ envelop_definition,$ options);
我收到此错误:«[401]连接到API(https://www.docusign.net/restapi/v2/accounts/xxxxx/envelopes)时出错”
此错误通知我我未被授权。此代码在沙盒中正常运行。
我认为问题出在帐户设置上-也许缺少特殊权限...