Using Oauth 2.0 with GF

Hi,

I’m currently using Gravity Forms and the webhook addon to post to submissions to a mock server. The final endpoint I’m looking to point to may require Oauth in order to post. I’m not seeing Oauth within the webhook addon so my questions are:

  1. Is there a different GF Addon for posting to an API that features Oauth within it?
  2. Has anyone adapted the GF Webhook addon to use Oauth?

I could remove the webhook addon and just write the code for this, however I’d like to try and keep the backend interface for the client to change down the line - that’s why I’d like to keep using the webhook addon for now.

Any thoughts, opinions or suggestions are appreciated. Thank you

Tom

You could use the gform_webhooks_request_headers filter to add the authorization header just before the add-on sends the data to the destination endpoint.

See the following page of the documentation for usage examples: gform_webhooks_request_headers - Gravity Forms Documentation

The filter can be used in the theme functions.php file, a custom plugin, or via a code snippets plugin.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.