Command

nylas auth token

Display the configured API key.

Written by Qasim Muhammad Staff SRE

What does nylas auth token do?

The nylas auth token command prints the application API key stored by the CLI. It does not mint or return a grant-scoped Nylas access token. Use it carefully when debugging authentication or passing the API key to a trusted script.

Usage

nylas auth token

Flags

FlagDescription
--jsonOutput as JSON
--no-colorDisable color output
--verbose(-v)Enable verbose output
--configCustom config file path
--help(-h)Show help for the command
--limitLimit results (most list commands)
--yes(-y)Skip confirmations
--copy(-c)Copy to clipboard

Examples

The nylas auth token command prints the application API key stored by the CLI.

Display API key

nylas auth token

Pass API key to curl

curl -H "Authorization: Bearer $(nylas auth token)" https://api.us.nylas.com/v3/grants

Example output

API Key: nyl_abc123def456ghi789
Region:  us

Use --copy to copy the key to your clipboard.

Troubleshooting

No API key displayed

No API key is configured. Run `nylas auth config --api-key` first.

API key doesn't work with API calls

Make sure you're using the right base URL for your region (us or eu). Check with `nylas auth show`.

Recommended guides

Run nylas auth token --help for full help output.