As I understand with laravel passport, in order for a third party application to consume my api they need to register their application with mine by creating a client.

The passport:client artisan command can be used to create clients. When using this command it prompts you for a user id to assign the client to as follows:

Which user ID should the client be assigned to?:
> 1

However what if the user is not registered in your application, whose user id do you supply?

Basically I would want to control which thirdparty applications can consume my api e.g. I don't want my users to be able to create their own clients but rather go through an admin approval process.

How would you manage such a work flow. Would you create clients on their behalf, assign the clients to my own user id (admin user id) and then provide the third party application with the client id and secret key?

Or would you simply allow them to create their own clients by registering as a user in my application and then allow them to use the vue components to create their clients. However I would want overall control as to which applications are being registered and some kind of approval before they can start using their client id and secret to consume the api.

How would I go about this.

Any tips and advice would be appreciated.

1 Answer 1


There is a different Clients for a different types of users in Laravel Passport. For own users you can use Password Grant Client (create one client for all users). For users from external applications you can make something like registration with approval,I think there is sense to use Client Credential Grant, to create different clients for different external applications.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.