Command

nylas auth token

Display current API token.

Written by Qasim Muhammad Staff SRE

What does nylas auth token do?

The nylas auth token command prints the active API token or access token for the current grant. Useful for debugging authentication issues, passing tokens to external scripts, or inspecting token claims.

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

Display token

nylas auth token

Pass token 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 token displayed

You're not authenticated. Run `nylas auth config --api-key` or `nylas auth login` first.

Token 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.