Search code examples
laravelapilaravel-passport

How to generate only API_KEY and USER_SECRET in with laravel passport


I am developing api using laravel passport. But i have tried using the various grant types, the authorization code, password grants, client credentials but still not getting the desired result i want. Maybe i am not able to understand well. Looking at stripe, after you signup, you get api key and a secret which you use in your application. How do I achieve same result using passport where after user signup, user get API_KEY and USER_SECRET to use in his application.


Solution

  • To generate passport:keys you need to execute:

    php artisan passport:keys
    

    More you can read here.

    Also, you will need to create client with:

    php artisan passport:client
    

    More in docs.