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:
vendor/bin/twf login --client-id=… --client-secret=… --redirect-uri=http://localhost:8765/callbackThe redirect URI must be registered with your client. Without --redirect-uri the login uses http://localhost:8765/callback.
With environment variables
Section titled “With environment variables”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.
A Twinfield Connect you run yourself
Section titled “A Twinfield Connect you run yourself”vendor/bin/twf login --connect-url=https://connect.example.comOr set TWINFIELD_CONNECT_URL.
After the login
Section titled “After the login”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.
Twinfield and Wolters Kluwer are trademarks of Wolters Kluwer. Their names and logos are used only to refer to their products.