{"id":15040764,"date":"2021-11-05T15:47:48","date_gmt":"2021-11-05T15:47:48","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/exception-for-api\/"},"modified":"2021-11-05T15:47:48","modified_gmt":"2021-11-05T15:47:48","slug":"exception-for-api","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/exception-for-api\/","title":{"rendered":"Exception for api"},"content":{"rendered":"<p>Hi<\/p>\n<p>I&#8217;am using force login for my wordpress and i need to add a exception for a special path in the wordpress api.<\/p>\n<p>I have try with the filter v_forcelogin_bypass but that dont work with my api path.<\/p>\n<p>I use register_rest_route function for register my route.<\/p>\n<p>The reponse is:<\/p>\n<pre><code>{\n    &quot;code&quot;: &quot;rest_unauthorized&quot;,\n    &quot;message&quot;: &quot;Seuls les utilisateurs authentifi\u00e9s peuvent acc\u00e9der \u00e0 l\u2019API REST.&quot;,\n    &quot;data&quot;: {\n        &quot;status&quot;: 401\n    }\n}<\/code><\/pre>\n<p>Thanks for the help<\/p>\n","protected":false},"template":"","class_list":["post-15040764","topic","type-topic","status-publish","hentry","topic-tag-api","topic-tag-exception"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15040764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15040764\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15040764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}