title: PHP Laravel DocuSign Embedded Signing: Input string was not in a correct format
body: <p>Currently Using:
  Laravel 5.5</p>
  
  <p>"tucker-eric/docusign-rest-client": "^1.0",</p>
  
  <p>"tucker-eric/laravel-docusign": "^0.1.1"</p>
  
  <p><strong>Intention is to generate a URL so all customers / agents sign on the spot</strong></p>
  
  <p>Here is what I have so far</p>
  
  <p><strong>I  first create the client</strong></p>
  
  <pre><code>$client = new DocuSign\Rest\Client([
          'username'       =&gt; env('DOCUSIGN_USERNAME'),
          'password'       =&gt; env('DOCUSIGN_PASSWORD'),
          'integrator_key' =&gt; env('DOCUSIGN_INTEGRATOR_KEY'),
          'host'           =&gt; env('DOCUSIGN_HOST')
      ]);
  </code></pre>
  
  <p><strong>For each signer I assign their name and email</strong></p>
  
  <pre><code>    $templateRole1 = $client-&gt;templateRole([
          'email'     =&gt; 'abc@gmail.com',
          'name'      =&gt; 'abc',
          'role_name' =&gt; 'Agent'
      ]);
  
      $templateRole2 = $client-&gt;templateRole([
          'email'     =&gt; 'abc123@gmail.com',
          'name'      =&gt; 'abc',
          'role_name' =&gt; 'Purchaser 1'
      ]);
  
      $templateRole3 = $client-&gt;templateRole([
          'email'     =&gt; 'abc124@gmail.com',
          'name'      =&gt; 'abc124',
          'role_name' =&gt; 'Purchaser 2'
      ]);
  
      $templateRole4 = $client-&gt;templateRole([
          'email'     =&gt; 'abc125@gmail.com',
          'name'      =&gt; 'abc125',
          'role_name' =&gt; 'Seller'
      ]);
  </code></pre>
  
  <p><strong>I create the envelope (not sure why it sends it, I dont want it sent yet</strong></p>
  
  <pre><code>    $envelopeDefinition = $client-&gt;envelopeDefinition([
          'status'         =&gt; 'sent',
          'email_subject'  =&gt; '[DocuSign PHP SDK] - Signature Request Sample',
          'template_id'    =&gt; '***abc-123-',
          'template_roles' =&gt; [
              $templateRole1,
              $templateRole2,
              $templateRole3,
              $templateRole4,
          ],
      ]);
  </code></pre>
  
  <p><strong>Envelope options just because even tho I don't have any</strong></p>
  
  <pre><code>    $envelopeOptions = $client-&gt;envelopes-&gt;createEnvelopeOptions([]);
  </code></pre>
  
  <p><strong>Creates the final envelope</strong></p>
  
  <pre><code>    $envelopeSummary = $client-&gt;envelopes-&gt;createEnvelope($envelopeDefinition, $envelopeOptions);
  </code></pre>
  
  <p><strong>Prepare the embedding so I can extract the URL</strong></p>
  
  <pre><code>        $envelopeApi = $client-&gt;envelopes;
          $recipient_view_request = new \DocuSign\eSign\Model\RecipientViewRequest();
          $recipient_view_request-&gt;setReturnUrl('https://www.example.net/callback/docusign');
          $recipient_view_request-&gt;setClientUserId((string) $client-&gt;getAccountId());
          $recipient_view_request-&gt;setAuthenticationMethod("None");
  
      try {
              $signingView = $envelopeApi-&gt;createRecipientView($client-&gt;getAccountId(), $envelopeSummary-&gt;getEnvelopeId(), $recipient_view_request);
          } catch (DocuSign\eSign\ApiException $e){        
              echo "Error connecting Docusign : " . $e-&gt;getResponseBody()-&gt;errorCode . " " . $e-&gt;getResponseBody()-&gt;message;
          }
  </code></pre>
  
  <p>Which returns:</p>
  
  <pre><code>object(DocuSign\eSign\Model\ErrorDetails)#419 (1) { ["container":protected]=&gt; array(2) { ["error_code"]=&gt; string(20) "INVALID_REQUEST_BODY" ["message"]=&gt; string(94) "The request body is missing or improperly formatted. Input string was not in a correct format." } } Error connecting Docusign : INVALID_REQUEST_BODY The request body is missing or improperly formatted. Input string was not in a correct format.done
  </code></pre>
  
  <p>My question is what I'm doing wrong to get this error returned, and why is it sending the email to the people signing as I didn't explicitly tell it</p>
  
  <p>Thanks</p>