---
title: Retrieve your authentication token with `wrangler auth token`
description: A new command to retrieve your current authentication credentials for use with other tools and scripts.
image: https://developers.cloudflare.com/changelog-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/changelog/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://developers.cloudflare.com/changelog/rss/index.xml) [ View RSS feeds ](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://developers.cloudflare.com/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://developers.cloudflare.com/changelog/) 

## Retrieve your authentication token with \`wrangler auth token\`

Dec 18, 2025 

[ Workers ](https://developers.cloudflare.com/workers/) 

Wrangler now includes a new [wrangler auth token](https://developers.cloudflare.com/workers/wrangler/commands/general/#auth-token) command that retrieves your current authentication token or credentials for use with other tools and scripts.

```sh
wrangler auth token
```

The command returns whichever authentication method is currently configured, in priority order: API token from `CLOUDFLARE_API_TOKEN`, or OAuth token from `wrangler login` (automatically refreshed if expired).

Use the `--json` flag to get structured output including the token type:

```sh
wrangler auth token --json
```

The JSON output includes the authentication type:

**JSONC**

```jsonc
// API token
{ "type": "api_token", "token": "..." }


// OAuth token
{ "type": "oauth", "token": "..." }


// API key/email (only available with --json)
{ "type": "api_key", "key": "...", "email": "..." }
```

API key/email credentials from `CLOUDFLARE_API_KEY` and `CLOUDFLARE_EMAIL` require the `--json` flag since this method uses two values instead of a single token.

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://developers.cloudflare.com/changelog/post/2025-12-18-wrangler-auth-token/#page","headline":"Retrieve your authentication token with `wrangler auth token` · Changelog","description":"A new command to retrieve your current authentication credentials for use with other tools and scripts.","url":"https://developers.cloudflare.com/changelog/post/2025-12-18-wrangler-auth-token/","inLanguage":"en","image":"https://developers.cloudflare.com/changelog-preview.png","dateModified":"2025-12-18","datePublished":"2025-12-18","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
