Skip to content

twf token

Print a valid access token.

Terminal window
twf token [options]

twf token prints the access token of a profile on standard output, and nothing else. When the stored token has expired, the command first gets a new one and stores it.

Option Description
--profile=<name> The login to use, see Profiles. Default: TWINFIELD_PROFILE or default.

See twf for the options every command takes.

Use the token in a request with curl:

Terminal window
curl --header "Authorization: Bearer $(vendor/bin/twf token)" "$url"

Keep it in a variable:

Terminal window
token=$(vendor/bin/twf token --profile=acme)
Made by SolveBeam

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