Laravel Passport Password Grant - Client authentication failed
<p>After hearing a lot about laravel passport, i thought of implementing it into my new project where my requirement is to create an API that'll be used in a mobile app.</p>

<p>So my mobile app is a <code>client</code>, which will further have its users.</p>

<p>I followed the steps <a href="https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/13" rel="noreferrer">mentioned by Taylor</a> and also read about it <a href="https://mattstauffer.co/blog/introducing-laravel-passport" rel="noreferrer">here</a>. In a nutshell I followed these steps:</p>

<ol>
<li>Installed <code>laravel/passport</code>.</li>
<li>Created a website user.</li>
<li>Generated passport keys <code>php artisan passport:install</code></li>
<li>Generated <code>client_id</code> and <code>client_secret</code> using <code>php artisan passport:client</code></li>
<li>Added <code>redirection</code> and <code>callback</code> routes in <code>web.php</code> </li>
<li>Authorized the user and got the final access token.</li>
</ol>

<p>Then I tried calling <code>api/user</code>( with Header <code>Authorization</code> containing value <code>Bearer eyJ0eXAiOiJKV1...(token)</code></p>

<p>I received the data. Pretty simple and neat.</p>

<p>But my app users won't have these details. So I thought of configuring <a href="https://laravel.com/docs/5.3/passport#password-grant-tokens" rel="noreferrer">Password Grant Tokens</a> which fits perfectly in my requirement. </p>

<p>Now starts the real headache. I've been trying to set this up for the last 3 days and continuously getting</p>

<pre><code>{"error":"invalid_client","message":"Client authentication failed"}
</code></pre>

<p>I've tried almost every guide I followed online: <a href="https://stackoverflow.com/questions/39315803/laravel-5-3-passport-implementation-errorinvalid-client-messagecli">Redirection Issues</a>, <a href="https://laracasts.com/discuss/channels/laravel/laravel-passport-and-postman-gets-all-the-time-unauthorised" rel="noreferrer">Add Atleast One Scope Solution</a>, <a href="https://github.com/laravel/passport/issues/47" rel="noreferrer">P100Y Issue</a> etc.</p>

<p>But I'm still getting <code>invalid client</code> error. Here's what I'm passing through POSTMAN to <code>oauth/token</code>:</p>

<pre><code>{
    "grant_type": "password,"
    "client_id": "3,"
    "client_secret": "8BUPCSyYEdsgtZFnD6bFG6eg7MKuuKJHLsdW0k6g,"
    "username": "test@gmail.com,"
    "password": "123456,"
    "scope": ""
}
</code></pre>

<p>Any help would be appreciated.</p>