Title: Issues with REST API
Last modified: April 1, 2021

---

# Issues with REST API

 *  Resolved [bohcurtis](https://wordpress.org/support/users/bohcurtis/)
 * (@bohcurtis)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issues-with-rest-api/)
 * I am having issues using Gravity Flow Form Connector on the same server as this
   plugin. I believe it may be blocking the REST API functionality for me. I have
   commenting out the REST API section in the plugin code but it is still having
   the same issues. Any help is appreciated.

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

 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issues-with-rest-api/#post-14265309)
 * Hi, thanks for using Force Login!
 * If you deactivate Force Login, are you still having issues?
 *  Thread Starter [bohcurtis](https://wordpress.org/support/users/bohcurtis/)
 * (@bohcurtis)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issues-with-rest-api/#post-14265955)
 * No, it works perfectly fine once Force Login is disabled
 *  Thread Starter [bohcurtis](https://wordpress.org/support/users/bohcurtis/)
 * (@bohcurtis)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issues-with-rest-api/#post-14270287)
 * Could I maybe whitelist a certain IP address? Is that possible?
 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issues-with-rest-api/#post-14278665)
 * You can bypass Force Login based on any condition by adding the `v_forcelogin_bypass`
   filter to your site. [Check out the FAQs](https://wordpress.org/plugins/wp-force-login/#faq)
   for an example.
 *  Thread Starter [bohcurtis](https://wordpress.org/support/users/bohcurtis/)
 * (@bohcurtis)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issues-with-rest-api/#post-14278815)
 * I can see how to use this for pages on my website, but how would I whitelist 
   all of REST API? I do not have URLs for them, as it all behind-the-scenes through
   a plugin I use
 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issues-with-rest-api/#post-14278866)
 * You said you commented out the REST API code in Force Login and that it still
   wasn’t working. I assumed you were now asking about how to bypass the login redirect.
 * The `v_forcelogin_bypass` filter should return a `true|false` boolean value to
   determine whether or not Force Login runs. Your condition can be checking if 
   the visitor’s IP address matches the one(s) you want to allow.
 * However, if you issue isn’t with the force login redirect, but with Force Login’s
   restriction to the REST API for authorized users, you may allow the REST API 
   to be publicly accessible again by adding one of the following code snippets 
   to your functions.php file:
 *     ```
       add_filter( 'rest_authentication_errors', '__return_true' );
       ```
   
 * OR
 *     ```
       remove_filter( 'rest_authentication_errors', 'v_forcelogin_rest_access', 99 );
       ```
   
 *  Thread Starter [bohcurtis](https://wordpress.org/support/users/bohcurtis/)
 * (@bohcurtis)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issues-with-rest-api/#post-14282496)
 * I have tried both of those code snippets separately in my functions.php file 
   with no luck. Any other ideas?
 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issues-with-rest-api/#post-14283845)
 * If removing the REST API restriction (either with filters or code commenting)
   does not resolve the issue, then I would assume that is not the cause of the 
   issue.
 * Maybe try enabling `WP_DEBUG` mode and checking your error logs for any clues
   of what’s failing and where.
 * You might need to dig into the _Gravity Flow Form Connector_ plugin code to see
   what that plugin is trying to do and when, to figure out how to allow Force Login
   to bypass it.
 * Let me know if you figure out what the cause is and what your solution ends up
   being.
 * Good luck!

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

The topic ‘Issues with REST API’ is closed to new replies.

 * ![](https://ps.w.org/wp-force-login/assets/icon.svg?rev=1904031)
 * [Force Login](https://wordpress.org/plugins/wp-force-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-force-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-force-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-force-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-force-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-force-login/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/issues-with-rest-api/#post-14283845)
 * Status: resolved