How can I submit form values via the API?

  • Profile Image
    Jordan Darabos 
    Asked on January 30, 2018 at 06:48 PM
    Hi,
     
    We have had a jotform account for a while now. We want to communicate one of our software applications to jotform using the API.
     
    From Python I have been able to pass my apiKey as well as a formID and read submissions from a specific form.
    ---------------------------------------------------------
    from jotform import JotformAPIClient
     
    jotformAPI = JotformAPIClient("apiKey")
    forms = jotformAPI.get_forms()
     
    submiss = jotformAPI.get_form_submissions("FormID")
    mySubMiss = jotformAPI.get_submission(submiss[10]['id'])
     
    print mySubMiss
    ---------------------------------------------------------
     
    Now, if I try to use the following method to create a submission I get a 401 response error
     
    ---------------------------------------------------------
    done = jotformAPI.create_form_submissions("FormID", {"24":"My Value"})
     
    print done
    ---------------------------------------------------------
     
    The same error happens if I try to post a submission using you guys web service tools online.
     
    { "responseCode": 401, "message": "You're not authorized to use (/form/80166112939962/submissions) ", "info": "http://api.jotform.com/docs#form-id-submissions", "limit-left": 61155, "duration": "22ms" } 
     
    Is there any permission thing we need to enable on our jotform account?
     
    I really appreciate some help on this. 
     
    Thanks,
  • Profile Image
    Welvin
    Answered on January 30, 2018 at 08:56 PM

    I think that is because you are using an API with read-only permission. Please make sure to use an API with full permission. Also, I suggest creating an account first before creating an API. 

    https://www.jotform.com/myaccount/api 

  • Profile Image
    Jordan Darabos 
    Answered on January 31, 2018 at 08:35 AM

    Awesome! That worked!

    However, now it does not send email notifications or send data to the Google spreadsheet. How do we implement that? Thank you!

  • Profile Image
    Welvin
    Answered on January 31, 2018 at 09:55 AM

    Great!

    I believe the notification and integration should be configured in the form. If you have already done so, and still nothing, I'd suggest reaching our API Team at api@jotform.com. They should be able to help you in this matter.

    https://www.jotform.com/help/25-Setting-Up-Email-Notifications

    https://www.jotform.com/help/228-How-to-Integrate-Form-with-Google-Spreadsheet