AiX En
AiX En

Reputation: 31

Laravel Passport client_credentials

Good Day does any one using the method like this one ? https://laravel.com/docs/5.4/passport#client-credentials-grant-tokens

i try to make registration API that has client_id and client_secret only and i want the return that as access token, refresh token, expire_date but the return of the www.url.com/oauth/token is this

{
    "error": "unsupported_grant_type",
    "message": "The authorization grant type is not supported by the authorization server.",
    "hint": "Check the `grant_type` parameter"
}

anyone can help me.. ? thanks in advance

Upvotes: 0

Views: 1752

Answers (1)

w0rd-driven
w0rd-driven

Reputation: 933

I know this is old and I don't know if you got it working. Based on your description of the problem, the grant_type parameter is likely missing from the request. You need grant_type, client_id, and client_secret. When I omit the parameter I get the same validation error message. If you're using the client credentials grant you need 'grant_type' => 'client_credentials' if you're using code in the example.

Upvotes: 2

Related Questions