Title: WP rest api with post data
Last modified: February 5, 2019

---

# WP rest api with post data

 *  [dileepkumarraja](https://wordpress.org/support/users/dileepkumarraja/)
 * (@dileepkumarraja)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/wp-rest-api-with-post-data/)
 * Hi,
 * We’re using wp rest api v2 in the website for api and we need to use contact 
   form 7 route
 * [http://<site.url>/wp-json/contact-form-7/v1/contact-forms/<contact-form](http://<site.url>/wp-json/contact-form-7/v1/contact-forms/<contact-form)
   id>
 * {“code”:”wpcf7_forbidden”,”message”:”You are not allowed to access contact forms.”,”
   data”:{“status”:403}}
 * how to pass the data contact form with post method using rest api

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/wp-rest-api-with-post-data/#post-11171570)
 * See [https://developer.wordpress.org/rest-api/](https://developer.wordpress.org/rest-api/)
 *  Thread Starter [dileepkumarraja](https://wordpress.org/support/users/dileepkumarraja/)
 * (@dileepkumarraja)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/wp-rest-api-with-post-data/#post-11173907)
 * Hi [@takayukister](https://wordpress.org/support/users/takayukister/),
 * Thanks for replay,I’m not able access the contact form with contact form id.
 * {“code”:”wpcf7_forbidden”,”message”:”You are not allowed to access contact forms.”,”
   data”:{“status”:403}} here i’m getting the response how to resolve this issue
 *  [Lukasz](https://wordpress.org/support/users/wpfed/)
 * (@wpfed)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/wp-rest-api-with-post-data/#post-11176043)
 * To be more specific you need authentication, I can see in the code:
 *  if ( ! current_user_can( ‘wpcf7_edit_contact_form’, $id ) ) {
    return new WP_Error(‘
   wpcf7_forbidden’, __( “You are not allowed to access the requested contact form.”,‘
   contact-form-7’ ), array( ‘status’ => 403 ) ); }
 * [https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WP rest api with post data’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Lukasz](https://wordpress.org/support/users/wpfed/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/wp-rest-api-with-post-data/#post-11176043)
 * Status: not resolved