• Resolved aholsteinson

    (@aholsteinson)


    I am trying to use Contact Form 7 with the REST API in order to have my Contact Form 7 form receive json data from another app. But even tho the plugin now supports the REST API I am not able to make any of it’s end points work.

    As far as I know these are the end points:

    https://example.com/wp-json/contact-form-7/v1
    https://example.com/wp-json/contact-form-7/v1/contact-forms
    https://example.com/wp-json/contact-form-7/v1/contact-forms/(?P<id&gt;\d+)

    But when I try to view “contact-form-7/v1/contact-forms” I get the following message:

    {
    “code”: “wpcf7_forbidden”,
    “message”: “You are not allowed to access contact forms.”,
    “data”: {
    “status”: 403
    }
    }

    Tried looking at the documentation to see if there was an explanation on how to use this feature but there isn’t. Has anyone used this plugin with the REST API?

    Basically what I want to do is, I will have a form in another app which will collect data, this data will then be sent to WordPress and Contact Form 7 via the REST APi and have it be stored in the database as a regular form entry.

    Any help is appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m having the same issue. Did you ever resolve this?

    Thread Starter aholsteinson

    (@aholsteinson)

    @arlo

    Yeah I got it working. I just used the endpoint from within my app like so…

    http:/yourdomain.com/wp-json/contact-form-7/v1/contact-forms/*/feedback

    Replace the * with the ID of your form. That should do the POST request via Contact Form 7.

    • This reply was modified 7 years, 1 month ago by aholsteinson.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trying to use REST Api endpoints: “You are not allowed to access contact forms.”’ is closed to new replies.