A Chrome browser extension that allows users to extract and copy API authentication tokens used by the currently active browser tab.
Extension/
├── manifest.json # Chrome MV3 manifest configuration
├── background.js # Service worker for token detection
├── popup.html # Popup UI structure
├── popup.js # Popup logic and interactions
├── settings.html # Settings page structure
├── settings.js # Settings logic and persistence
├── styles/
│ ├── popup.css # Popup styling
│ └── settings.css # Settings page styling
├── icons/
│ ├── icon16.svg # 16x16 extension icon
│ ├── icon48.svg # 48x48 extension icon
│ └── icon128.svg # 128x128 extension icon
└── README.md # This file
- Open Chrome and navigate to
chrome://extensions/ - Enable Developer mode (toggle in the top-right corner)
- Click Load unpacked
- Select the
Extensionfolder - The extension icon will appear in the toolbar
- Navigate to a website that makes authenticated API calls
- Click the extension icon to open the popup
- API tokens will be automatically detected from request headers
- Click Copy Token on any detected token to copy it to clipboard
The extension supports three token types:
- Authorization Bearer (default): Detects
Authorization: Bearer <token>headers - Session Token: Detects session-related headers (X-Session-Token, etc.)
- Custom Header: User-defined header name
The extension supports three token sources:
- API Request Headers (default): Intercepts outgoing API requests
- Browser Storage: Scans localStorage and sessionStorage
- Cookies: Scans browser cookies
Click the ⚙️ button to access settings:
- Token Type: Select which type of token to detect
- Token Source: Select where to look for tokens
- Maximum Tokens: Limit displayed tokens (1-5)
- Auto-cleanup: Clear data when browser closes (enabled by default)
- Clear All Data Now: Manually clear all stored data
- Active Tab Only: Only monitors the currently active tab
- No External Transmission: Tokens are never sent externally
- No Auto-Copy: Requires explicit user action to copy tokens
- Auto-Cleanup: All data cleared on browser close (configurable)
- Session Storage: Tokens stored in session storage, not persistent
- Identical tokens appearing in multiple requests are shown only once
- Each unique token is associated with the first URL where it was detected
- Tokens are detected as API calls are made
- No polling or time-based scanning for header-based detection
- Storage/Cookie scanning is on-demand (click "Scan" button)
- Uses service worker instead of background page
- Uses
chrome.storage.sessionfor temporary data - Follows Chrome's security best practices
- The extension requires page refresh after changing settings
- DevTools is not required for the extension to work
- Token masking shows first 4 and last 4 characters only
No tokens detected?
- Ensure the website is making authenticated API calls
- Check if the token type matches your target (Bearer vs Session)
- For storage/cookies, click the "Scan" button manually
Extension not working on certain sites?
- Some sites use content security policies that may limit functionality
- Try refreshing the page after installing the extension
MIT License - Free for personal and commercial use.
