<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: talhabutt111</title>
    <description>The latest articles on DEV Community by talhabutt111 (@talhabutt111).</description>
    <link>https://dev.to/talhabutt111</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F291043%2F63dca6c2-5e5d-416a-ba2a-5d74e6069f56.png</url>
      <title>DEV Community: talhabutt111</title>
      <link>https://dev.to/talhabutt111</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/talhabutt111"/>
    <language>en</language>
    <item>
      <title>wordpress api with JWT Authentication for WP-API</title>
      <dc:creator>talhabutt111</dc:creator>
      <pubDate>Thu, 12 Dec 2019 13:10:17 +0000</pubDate>
      <link>https://dev.to/talhabutt111/wordpress-api-with-jwt-authentication-for-wp-api-1oo0</link>
      <guid>https://dev.to/talhabutt111/wordpress-api-with-jwt-authentication-for-wp-api-1oo0</guid>
      <description>&lt;p&gt;Hello i want implementing wordpress rest api in my nodejs express app.i am using JWT Authentication for WP-API plug in .but i cant not get all users from myapi call. following error i am facing when a call the route:&lt;/p&gt;

&lt;p&gt;{code:"rest_no_route"data:Object {status: 404}message:"No route was found matching the URL and request method",}&lt;/p&gt;

&lt;p&gt;Code for my rest wp route is following:&lt;/p&gt;

&lt;p&gt;var WPAPI = require('wpapi');  var wp = new WPAPI({ endpoint: 'domain.com/wp-json' }); wp.myCustomResource = wp.registerRoute('jwt-auth/v1', '/token',&lt;br&gt;
    { methods: 'POST', params: ['username', 'password'] })&lt;br&gt;
wp.myCustomResource()&lt;br&gt;
    .username('myUserName').password('myPassword')&lt;br&gt;
    .then(res =&amp;gt; console.log(res))&lt;br&gt;
    .catch(err =&amp;gt; console.error(err))&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;i have already generate token and validate it from postman. i code it from this site "&lt;a href="http://wp-api.org/node-wpapi/custom-routes/"&gt;http://wp-api.org/node-wpapi/custom-routes/&lt;/a&gt;"&lt;/p&gt;

&lt;p&gt;i already edit my .htaccess file and my plugin file( jwt-authentication-for-wp-rest-api/public/class-jwt-auth-public.php) but it does not helped me.&lt;/p&gt;

&lt;p&gt;if some one resolve this error kindly help us&lt;/p&gt;

</description>
      <category>wordpress</category>
    </item>
  </channel>
</rss>
