Gravity Forms REST API

Hello,

I’d like to connect Gravity Forms of my Wordpress site to my weweb application using REST API and use the data collected in my Gravity Forms forms.
I’ve generated a key but access in a browser to the link type: https://…/wp-json/gf/v2/forms/42/entries can only be accessed if I am connected to the back office of my wordpress site.

I have also in weweb :
stack: “AxiosError: Request failed with status code 401 at ft (https://editor-cdn.weweb.io/public/js/chunk-vendors.3121a639.js:492:418369) at XMLHttpRequest.m (https://editor-cdn.weweb.io/public/js/ch…”

message: “Request failed with status code 401”
name: “AxiosError”
code: “ERR_BAD_REQUEST”
status: 401
configObject
requestObject
response
status: 401
statusText: “Unauthorized”
dataObject
headersObject
configObject
requestObject

I understand that it’s an authentication problem, but I don’t know how to fix it.
How can I configure the REST API plugin on weweb?

Thank you in advance.

You need to generate an access token in Wordpress and pass it with your REST request to authorize yourself.

I never used Gravity forms before, but I am a long time WordPress user. You need to setup the an application password in the User with Admin role probably.

Also check if this API endpoint is exposed to “external platforms”. You can always use the plugin “WP REST API controller” to check this.

Hello @Broberto and @WeeeeeWeb,

Thank you for your reply.
I’m looking into how to generate a token with Gravity forms and then I’ll test it.
I’ll be back to explain the procedure.

Alternatively, you could trigger a webhook when a Gravity Form is submitted and then store the submission data in a Xano / Supabase database table.

Hello,

I’ve tried several methods Basic Auth, JWT, Gravity Forms API Keys, and I always get the same message:
code: “rest_forbidden”
message: “Sorry, you don’t have permission to do this.”

In your opinion, is the problem with Weweb or Wordpress?

Thanks

Hello,

I’ve finally used webhooks with this tutorial: Webhooks | Xano, which works perfectly.
If it helps anyone :wink: