Score:-1

Webform submissions to 3rd party API with Refresher Authentication token

id flag

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

cn flag
You are going to want to write your own webform handler in a custom module.
Renato Francia avatar
id flag
@RyanHartman I thought this will be the case.
Score:0
id flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.