-1

How can you send the submitted information in a webform to a 3rd party API?

I have read this: https://www.drupal.org/docs/8/modules/webform/webform-cookbook/how-to-programmatically-create-and-update-a-submission

But it looks this recipe is more about updating a submission rather that doing requests.

Any help?

Note:

I realized I can use handlers for submission, but need to use a refresh authentication token for submission. Are there any hooks for that?

I'm looking for hooks grab the data submitted from a specific form, then creates a POST request to create an access code and finally makes a POST request for a 3rd party API.

Using Zoho CRM API

2
  • 1
    You are going to want to write your own webform handler in a custom module. Jul 21, 2021 at 16:10
  • @RyanHartman I thought this will be the case. Jul 21, 2021 at 16:26

1 Answer 1

0

I have found this article creating a extension of a post handler to target specific webforms on submission.

https://www.chapterthree.com/blog/drupal-8-how-to-extending-a-webform-remote-post-handler

Code: https://github.com/chapter-three/drupal-hook-webform-handler-invoke-alter-example/blob/master/snippet.php

This is a very hard-coded solution, so I might think this might be a good idea to create a contrib module to extend the post request handler with multiple submissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.