Browser Extension Identifier, Manifest Key, and Runtime ID
How extension IDs are defined, kept stable in development, and used across runtime, management, and other extension APIs.
This page summarizes how identifiers work in Chrome extension documentation: the stable extension ID tied to your package, the manifest key used to preserve that ID while developing, and the many other id fields in browser.* / chrome.* APIs that refer to bookmarks, menu items, accounts, or hardware—not the extension itself.
Extension ID: what it is and where you read it
Section titled “Extension ID: what it is and where you read it”The extension ID is the public, stable string Chrome assigns to an installed extension (or theme). It appears in the extension origin (chrome-extension://<id>/), in inter-extension messaging targets, and in policies that whitelist a specific package.
On the running extension, the canonical read is runtime.id. The reference describes it as:
The ID of the extension/app.
— Chrome, runtime
The same value is exposed when you inspect installed software through the management API. management.ExtensionInfo is described as:
Information about an installed extension, app, or theme.
— Chrome, management
Its id field is documented as:
The extension’s unique identifier.
— Chrome, management
Many management methods take that string to enable, disable, uninstall, or change launch options—for example parameters documented as “the id from an item of management.ExtensionInfo” on management. Treat every such id as the extension ID unless the method name clearly refers to something else (apps, launch types, options).
Manifest key: keep a consistent extension ID during development
Section titled “Manifest key: keep a consistent extension ID during development”Unpacked extensions normally get a new ID when the signing key changes. That breaks OAuth redirect URIs, externally_connectable allowlists, and any server rule keyed on chrome-extension://<id>/.
The manifest key field exists so the ID stays fixed while you iterate locally. Chrome documents the purpose as:
This value maintains the unique ID of an extension, or theme when it is loaded during development.
— Chrome, Manifest - key
Common reasons listed there:
To configure a server to only accept requests from your Chrome Extension origin. So that other extensions or websites can send messages to your extension. So that a website can access the web_accessible_resources of your extension.
— Chrome, Manifest - key
The OAuth integration guide stresses the same constraint:
Preserving a single ID is essential during development. To keep a consistent ID, follow these steps:
— Chrome, OAuth 2.0: authenticate users with Google
Without a stable ID, Google OAuth client configuration (extension-specific redirect URLs) and backend origin checks will not match the ID shown in chrome://extensions.
How key relates to runtime.id and published builds
Section titled “How key relates to runtime.id and published builds”During development, packing or loading with a fixed key makes runtime.id predictable. In the Chrome Web Store, the store signing key defines the ID for production installs; your published ExtensionInfo.id from management should match what users and servers see. Do not confuse version / versionName on ExtensionInfo (package metadata) with id (identity of the install).
Same parameter name, different meanings: a field guide
Section titled “Same parameter name, different meanings: a field guide”Across the extension platform, id almost always means string. What it points to depends on the API. Mixing these up is a frequent source of bugs.
| API area | What id refers to |
Source |
|---|---|---|
runtime.id |
This extension’s ID | runtime |
management.* (typical) |
Installed extension / app / theme ID | management |
bookmarks.* |
Bookmark node ID, or list of node IDs (idOrIdList) |
bookmarks |
contextMenus.create return value |
New context menu item ID (number | string) |
contextMenus |
identity profile info |
Signed-in account ID (not extension ID) | identity |
contentSettings resource |
Resource identifier for a content type | contentSettings |
system.display |
Display hardware ID | system.display |
vpnProvider |
VPN configuration ID to destroy | vpnProvider |
Account id vs extension id (identity)
Section titled “Account id vs extension id (identity)”For Google sign-in flows, identity exposes user account fields. The account identifier is documented as:
A unique identifier for the account. This ID will not change for the lifetime of the account.
— Chrome, identity
email and id may be empty unless the user is signed in and the manifest includes the right permissions—for example:
Empty if the user is not signed in or the identity.email manifest permission is not specified.
— Chrome, identity
Never pass an account id where an extension ID is required (or the reverse).
Resource paths vs identifiers
Section titled “Resource paths vs identifiers”Resolving packaged files uses a path, not the extension ID. runtime.getURL (and the MV2 extension equivalent) takes:
A path to a resource within an app/extension expressed relative to its install directory.
— Chrome, runtime
The resulting URL still lives under chrome-extension://<runtime.id>/..., but the path parameter is only the in-package relative path.
management.ExtensionInfo: metadata tied to one id
Section titled “management.ExtensionInfo: metadata tied to one id”When you enumerate or query by extension ID, management returns rich metadata for that single install, including:
permissionsandhostPermissions— API and host patterns grantedinstallType— how the item was installedenabled,disabledReason,mayDisable, and (when disabled)mayEnabletype— extension vs legacy app vs theme (isAppis deprecated in favor oftype)- For apps:
appLaunchUrl,availableLaunchTypes,launchType
The id on that object is the handle for follow-up calls (enable/disable, uninstall, set launch type). Always take id from a fresh ExtensionInfo rather than hard-coding, except when you intentionally target your own package via runtime.id.
Common mistakes
Section titled “Common mistakes”- Treating every
idas the extension ID — bookmark, menu, display, and VPN configuration IDs are unrelated strings or numbers. - Skipping manifest
keyduring OAuth or backend origin locks — IDs drift between machines or rebuilds; servers and OAuth clients then reject legitimate traffic. See Manifest - key and OAuth 2.0: authenticate users with Google. - Using account
identity.idfor extension routing — account IDs identify the user profile account, not the extension package (identity). - Confusing
versionwithid—ExtensionInfo.version/versionNamechange with releases;iddoes not (management). - Assuming MV2 and MV3 IDs differ — namespace changes (
chrome.*vsbrowser.*); the ID string for the same signed package does not.
How to check this on your site
Section titled “How to check this on your site”-
Open
chrome://extensions, enable Developer mode, and note the ID shown for your unpacked or packed build. It should stay the same across reloads if manifestkeyis set correctly. -
In the extension’s service worker or background context, log
browser.runtime.id(MV3) orchrome.runtime.id(MV2) per runtime and confirm it matches the ID onchrome://extensions. -
If you use Google OAuth, confirm your OAuth client’s extension redirect configuration matches that same ID following OAuth 2.0: authenticate users with Google.
-
Optionally call
management.getSelformanagement.getwith your ID (with themanagementpermission) and verifyExtensionInfo.idand permissions on management. -
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are asking about, and we will correct or clarify it.