Run the kongctl login command to initiate the device code authorization flow with
Konnect.
The command will output information similar to the following,
prompting you to open a URL in your browser with the one-time code to authenticate.
Logging your CLI into Kong Konnect with the browser...
To login, go to the following URL in your browser:
https://cloud.konghq.com/device-activate?code=KFVL-RXXJ
Or copy this one-time code: KFVL-RXXJ
And open your browser to https://cloud.konghq.com/device-activate
(Code expires in 899 seconds)
Waiting for user to Login...
After following the instructions in the browser and successfully authenticating,
you will see the message User successfully authorized.
This indicates that kongctl has negotiated with Konnect and
stored an access and refresh token pair for subsequent commands.
You can verify authentication by running:
You should see your Konnect user information.
Now you can execute kongctl commands and you will be granted access based on the permissions
of the user account you logged in with.
Info: The tokens obtained using the browser-based method will expire. When they do you can
simply re-exeucte the kongctl login procedure to obtain new tokens.
If you want to invalidate the token received from the browser-based method,
execute the logout command to clear stored credentials: