• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cannot create a new agreement to save my life!

New Here ,
Dec 12, 2019 Dec 12, 2019

Copy link to clipboard

Copied

Hi all. i've been struggling for days now trying to create a simple agreement. I have the document upload functioning correctly, and im using the same credentials. Whenever i hit POST /agreements and pass in the data, all i get is INVALID_JSON 500 error. What am i missing??

 

 

       $params =
            [
                'fileInfos' => [
                    'transientDocumentId' => '3AAABLblqZhCJyJvFARuKRcAoadE_PxzzDLTsDucsxhQdJgR3K_LSNW0FjLx64JSIMuAII5J4gLsI1cSnJTlUrMdNYSF3YxC-Ija_cUq50GzP-RAQEaDlZN0cKUd9PHEGN9yzCO9fxZGkrKMrfzlINRhEeqn1qZNOygGTrjr1ycewXxWK3jlR8sdsBc1vdaTsSmPvrQF-x4OWyx67kYFBpEB3S8kpMHpibMy1tOgjKApf5-9oYLxp6YV009QwJkKU1SmgT0AowR3VmnSBLUSKHXStV3b_TIMMjkX-IUZcq1CY-IRItatRAVHH2JVPG2FdO9vWBhbCzc8*',
                ],
                'name' => 'Agreement For Document # '.$document->getId(),
                'participantSetsInfo' => [
                    'memberInfos' => [
                        'email' => 'hemham914@gmail.com'
                    ],
                    'order' => 1,
                    'role' => 'SIGNER'
                ],
                'signatureType' => 'ESIGN',
                'state' => 'IN_PROCESS'
            ];

        $request = $this->apiClient->request('POST','https://api.na2.echosign.com/api/rest/v6/agreements', [
            'headers' => [
                'Authorization' => 'Bearer 3AAABLblqZhBk7GQFePMrS06G45rGzpLOpJpqe2XFXJ97Qp9cwwDuNozPUFdn7MOwJ9In2jtM2SgE0-dd0o50yjqd6wEy0CJj',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'form_params' => $params
        ]);       

 

 

Which returns this message:

 

["System Error: Client error: `POST https:\/\/api.na2.echosign.com\/api\/rest\/v6\/agreements` resulted in a `400 Bad Request` response:\n{\u0022code\u0022:\u0022INVALID_JSON\u0022,\u0022message\u0022:\u0022An invalid JSON was specified\u0022}\n",500]

 

The crazy thing is i actually got the params from the API Swagger documentation provided by Adobe's developer account, and when i run it via the "Try IT" button, it seems to work fine. I've triple checked my headers, not sure what the hell to do but its causing me to loose sleep!

 

please advise

 

TOPICS
Adobe Sign forms , How to sign , Send documents

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 08, 2020 Jul 08, 2020

Copy link to clipboard

Copied

LATEST

does anyone have the answer to - Cannot Send - An Invalid JSON was specified in Adobe Sign

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines