Skip to content

Your own Twinfield client

By default twf login goes through Twinfield Connect, so you do not need a Twinfield client ID. The first login registers the Twinfield CLI with Twinfield Connect, once per machine.

When you have your own Twinfield client, log in with it:

Terminal window
vendor/bin/twf login --client-id=… --client-secret=… --redirect-uri=http://localhost:8765/callback

The redirect URI must be registered with your client. Without --redirect-uri the login uses http://localhost:8765/callback.

Instead of the options you can set these variables:

Variable Option
TWINFIELD_CLIENT_ID --client-id
TWINFIELD_CLIENT_SECRET --client-secret
TWINFIELD_REDIRECT_URI --redirect-uri

An option wins over its variable.

Terminal window
vendor/bin/twf login --connect-url=https://connect.example.com

Or set TWINFIELD_CONNECT_URL.

The client is stored with the profile, so twf token, twf office list and Credentials::default() keep using it. twf status shows the client of each profile.

Made by SolveBeam

Twinfield and Wolters Kluwer are trademarks of Wolters Kluwer. Their names and logos are used only to refer to their products.