Method Community

 

Is API necessary or can I simulate a form post?

Last post 02-05-2016 3:20 PM by arrowplane. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-05-2015 10:10 AM

    Is API necessary or can I simulate a form post?

    Hello,

    My client has recently gotten set up with Method and they now need their website forms to talk to Method.  I'm using the popular Gravity Forms plugin on their WordPress site and would prefer to keep using it instead of the HTML that Method has provided.  Since the HTML provided is just a simple form, it seems like it should be possible to just post the form submission data directly to Method in the background.  Gravity Forms has a way to do this -- see this example: https://www.gravityhelp.com/documentation/article/gform_after_submission/#2-send-entry-data-to-third-party

    I have set this up for my client already, updating the key-value pairs in the $body array to correspond with the Method HTML variable names and the Gravity Form field values, respectively.  It seems like this should work.  However, my client hasn't yet seen any submissions in Method.

    Do you have any ideas why this might not have worked?  Should it be possible?

    Thanks.

  • 11-10-2015 10:32 AM In reply to

    Re: Is API necessary or can I simulate a form post?

    Hi arrowplane,

    There is additional functionality embedded in the Method Web-to-lead forms used for validation and authentication, which is most likley the reason why you do not see information flowing into the account.  Have you taken a look at our API? You could utilze API calls to insert values from the Gravity Forms yourself. 

    Jonathan Gamble
    Product Manager
    Method Integration Inc.
    Local and overseas: 416.847.0400
    Toll Free: 1.888.925.6238
    Fax: 416.640.6027
    E-mail: j.gamble@method.me
  • 01-21-2016 11:43 AM In reply to

    Re: Is API necessary or can I simulate a form post?

    I have been trying to use the API through a variety of methods I've seen in the forums.... and all of them return the same result:

    Failure. The API could not validate your log in. Please make sure you have entered the correct Company Account, User and Password, and that each are spelt correctly. Also, ensure that this User has been configured for Method API access by going to Customize > Users, editing the User, and ensuring that there is a check in the 'Is Allowed to Connect via MethodAPI' checkbox.

    I've double-checked the credientials and they are correct. I'm also able to return values when using this person's code -- https://www.method.me/cs/forums/p/6818/25395.aspx#25395 Which seems to tell me that my credientials are correct. But that is not the method I'm wanting to use. (I want to use MethodAPIInsertV2). It kind of seems like this error is generic, based on how many times I've seen it listed for various things in the forums. 

    It would be awesome if there was a Method-approved PHP example in the API docs. By searching in the forums, there's tons of people who have been looking for this, for years.

  • 01-28-2016 4:03 PM In reply to

    Re: Is API necessary or can I simulate a form post?

    Hello,

    Checking in again to see if anyone can assist.  Is this message happening in error for some reason?  It seems like it is a generic message and not valid?  Would be great if anyone could shed some light on this.

    Thanks.

  • 02-03-2016 6:22 PM In reply to

    Re: Is API necessary or can I simulate a form post?

    Hi Arrowplane,

    We are usually good at providing a meaningful error if the API call is malformed or incorrect - but this could be a case where the right information isn't making it's way back to you from the API.  

    My hunch is that it could be a data issue.  My initial thoughts are for you to double check that .. 

    • Your field names are valid (e.g. that they exist within the table)
    • You are passing the same number of arguments for Fields & Values parameters
    • Ensure you have included all required fields for the record 

    Can you please post up a code snippet demonstrating a failed call - this will help diagnose the issue.

    Cheers 

    Jonathan Gamble
    Product Manager
    Method Integration Inc.
    Local and overseas: 416.847.0400
    Toll Free: 1.888.925.6238
    Fax: 416.640.6027
    E-mail: j.gamble@method.me
  • 02-05-2016 11:21 AM In reply to

    Re: Is API necessary or can I simulate a form post?

    Thanks, Jonathan.  I have actually made some headway.  Once I've got everything 100% working I'll create a new post with a WordPress Gravity Forms PHP example, something that I and a few others had been looking for.  I post a reference in this thread as well.

  • 02-05-2016 11:35 AM In reply to

    Re: Is API necessary or can I simulate a form post?

    Great to hear!  Thanks arrowplane.

    Jonathan Gamble
    Product Manager
    Method Integration Inc.
    Local and overseas: 416.847.0400
    Toll Free: 1.888.925.6238
    Fax: 416.640.6027
    E-mail: j.gamble@method.me
  • 02-05-2016 3:20 PM In reply to

    Re: Is API necessary or can I simulate a form post?

    Here's the post referencing a working example: http://www.method.me/cs/forums/p/9307/31447.aspx#31447

Page 1 of 1 (8 items)