SmallyBigz
SmallyBigz

Reputation: 71

Docusign PHP Quickstart code Class 'DocuSign\eSign\ApiClient' not found

I downloaded the quickstart code from github and installed with composer and then filled in the correct credentials in the script. When I attempt to run the script qs-02-php-send-envelope.php

I get the following error:

Fatal error: Class 'DocuSign\eSign\ApiClient' not found in /public_html/docusign/qs-02-php-send-envelope.php on line 80

Upvotes: 1

Views: 981

Answers (2)

SmallyBigz
SmallyBigz

Reputation: 71

I was able to get the quickstart script working by changing the code at the error

from

$apiClient = new DocuSign\eSign\ApiClient($config);

to

$apiClient = new DocuSign\eSign\Client\ApiClient($config);

I think the issue is that composer when installing the files does not set up the file structure correctly because the files are there. So either the scripts need to be changed to point to the correct path or composer needs to make sure the file structure is correct.

Upvotes: 3

Larry K
Larry K

Reputation: 49114

I have confirmed that the bug exists. Unfortunately I don't have a solution. I have filed DocuSign internal bug report DEVDOCS-1251.

Work-around

I suggest that you instead start with the PHP Authorization Code Grant launcher and its workflow examples. I have verified that it is installing/working ok.

Upvotes: 0

Related Questions