How can I submit form values via the API?

  • Jordan Darabos
    Perguntado em 30 de janeiro de 2018 às 18:48
    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,
  • Welvin Support Team Lead
    Respondido em 30 de janeiro de 2018 às 20:56

    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 

  • Jordan Darabos
    Respondido em 31 de janeiro de 2018 às 08:35

    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!

  • Welvin Support Team Lead
    Respondido em 31 de janeiro de 2018 às 09:55

    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