Run the kongctl login command to initiate the device code authorization flow with
Konnect.
The command will prompt you to open a URL in your browser with a 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 run kongctl commands. You’ll have access based on the permissions
of the user account you logged in with.
Note: The tokens obtained using the browser-based method will expire. When they do, you can run kongctl login again to obtain new tokens.
If you want to invalidate the token received from the browser-based method,
run the logout command to clear stored credentials: