Skip to main content
April 23, 2016
Question

Invalid JSON was specified - create widget

  • April 23, 2016
  • 1 reply
  • 2412 views

here is the info:

url: https://api.na1.echosign.com:443/api/rest/v5/widgets

params for both headers and body:

{:headers=>

  {"Access-Token"=>"3AAABLblqZhBSxQhOuckMzzE01FwcFFxRl8ad5_GrL0BIPOU76wxvKAxoxg4Bq_6snz3_Dcd-T9TVpSFc1Z9aNZXwAJn4jdmZ",

   "Content-Type"=>"application/json"},

:body=>

  {"WidgetCreationRequest"=>

    "{\"widgetCreationInfo\":{\"fileInfos\":[{\"transientDocumentId\":\"3AAABLblqZhChCSf3YwK9P6kYwQhcGvBkpK4GdHjF4Et5Pe02NciwtRnSTzBzBt5Aeb1i7YY6GuBqNcbaKaF3d4Tw2oyRSc2Xyw5as-zH0aAgjMm_Db_iClXYX7EEoOccApujw_jnA7qvTxR4E_qV0TVJtOFREB4H5TU_XznLVhXErj2Y1hsZ7tMB_KFHj34L_5LTNXpFcMa9bgNh_rh76xB4U2KUuaRd\"}],\"name\":\"ROE eSign Authorization Form\",\"signatureFlow\":\"SENDER_SIGNATURE_NOT_REQUIRED\",\"mergeFieldInfo\":[{\"fieldName\":\"txtF_NumberOf_Employees\",\"defaultValue\":\"100\"},{\"fieldName\":\"txtF_Legal_Business_Name\",\"defaultValue\":\"Legal Business Name\"},{\"fieldName\":\"txtF_Contact_Name\",\"defaultValue\":\"Sereyboth Van\"},{\"fieldName\":\"txtF_Email\",\"defaultValue\":\"vsrboth@gmail.com\"},{\"fieldName\":\"txtF_Email\",\"defaultValue\":\"vsrboth@gmail.com\"},{\"fieldName\":\"txtF_Telephone\",\"defaultValue\":\"+8552383945834\"},{\"fieldName\":\"txtF_Fax2\",\"defaultValue\":\"+85523839458323\"},{\"fieldName\":\"txtF_Main_Address\",\"defaultValue\":\"Phnom Penh Cambodia 12110\"},{\"fieldName\":\"txtF_Address_2\",\"defaultValue\":\"Chroy Changva\"},{\"fieldName\":\"txtF_City\",\"defaultValue\":\"Phnom Penh\"},{\"fieldName\":\"txtF_Country\",\"defaultValue\":\"Cambodia\"},{\"fieldName\":\"txtF_Province\",\"defaultValue\":\"Phnom Penh\"},{\"fieldName\":\"txtF_Postal\",\"defaultValue\":\"12110\"},{\"fieldName\":\"txtF_Zip_Code\",\"defaultValue\":\"855\"},{\"fieldName\":\"txtF_Zip_Code\",\"defaultValue\":\"855\"},{\"fieldName\":\"txtF_Row1_Cell\",\"defaultValue\":\"100\"},{\"fieldName\":\"txtF_Row1_Cell2\",\"defaultValue\":\"8293583254CRAP00000\"},{\"fieldName\":\"txtF_Row1_Cell3\",\"defaultValue\":\"CRAP00000\"},{\"fieldName\":\"txtF_Legal_Business_Name2\",\"defaultValue\":\"Knits\"},{\"fieldName\":\"txtF_CRA_BN\",\"defaultValue\":\"123456789CRAP00000\"},{\"fieldName\":\"txtF_Contact_Name2\",\"defaultValue\":\"Elliot\"},{\"fieldName\":\"txtF_Telephone2\",\"defaultValue\":\"+788472857892\"},{\"fieldName\":\"txtF_Fax\",\"defaultValue\":\"+7884728523\"}],\"securityOptions\":{\"passwordProtection\":\"NONE\",\"kbaProtection\":\"NONE\",\"webIdentityProtection\":\"NONE\",\"protectOpen\":\"false\",\"internalPassword\":\"\",\"externalPassword\":\"\",\"openPassword\":\"\"},\"counterSignerSetInfos\":[{\"counterSignerSetRole\":\"APPROVER\"},{\"counterSignerSetMemberInfos\":[{\"email\":\"vsrboth@gmail.com\"}]}]}}"}}

here is how I get: 

{ "code": "INVALID_JSON", "message": "An invalid JSON was specified" }

My questions:

1. Do I need to write all the model schema for this?

2. I can't think of why the JSON is invalid, please kindly get back to me ASAP.

Thank you so much.

This topic has been closed for replies.

1 reply

Participant
September 6, 2022

I am in the same issue. Did you found your answer yet?