twf token
Print a valid access token.
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.
Options
Section titled “Options”| Option | Description |
|---|---|
--profile=<name> |
The login to use, see Profiles. Default: TWINFIELD_PROFILE or default. |
See twf for the options every command takes.
Examples
Section titled “Examples”Use the token in a request with curl:
curl --header "Authorization: Bearer $(vendor/bin/twf token)" "$url"Keep it in a variable:
token=$(vendor/bin/twf token --profile=acme)See also
Section titled “See also”twf statustwf process-xml: send an XML request without handling the token yourself.
Twinfield and Wolters Kluwer are trademarks of Wolters Kluwer. Their names and logos are used only to refer to their products.