Extension Manifest Permissions and Host Access
How to declare permissions and host access in extension manifest.json for browser APIs, including cookies, geolocation, and install warnings.
This page summarises Chrome Extensions documentation on declaring permissions and host permissions in manifest.json so an extension can call the matching chrome.* / browser.* APIs. Most extension APIs do nothing useful until the permission name from the reference page is listed under permissions (and sometimes under host_permissions).
manifest.json permissions: what you declare before calling an API
Section titled “manifest.json permissions: what you declare before calling an API”Chrome extensions reuse web capabilities but gate sensitive features behind manifest declarations. The debug extensions tutorial states that you should refer to the permissions article and the Chrome APIs to ensure an extension requests the correct permissions in the manifest.
Some extension APIs require permissions. Refer to the permissions article and the Chrome APIs to ensure an extension is requesting the correct permissions in the manifest.
— Google, Debug extensions
The usual pattern is a string entry in the permissions array whose name matches the API namespace (for example "bookmarks" for the bookmarks API).
{ "name": "My extension", "permissions": [ "bookmarks" ]}The same rule appears across the reference pages in this family: contentSettings, downloads, history, idle, privacy, proxy, offscreen, pageCapture, readingList, topSites, and others.
Manifest V2 pages use the same permission names; see for example chrome.alarms, chrome.browsingData, chrome.debugger, chrome.printing, and chrome.webNavigation.
Which permission string goes with which API?
Section titled “Which permission string goes with which API?”The permission identifier is almost always the API name. The table below maps cluster reference pages to the permissions value you add.
permissions value |
API reference |
|---|---|
alarms |
chrome.alarms |
bookmarks |
bookmarks |
browsingData |
chrome.browsingData |
contentSettings |
contentSettings |
contextMenus |
chrome.contextMenus |
cookies |
cookies |
debugger |
chrome.debugger |
downloads |
downloads |
fontSettings |
fontSettings |
history |
history |
idle |
idle |
input |
input.ime |
management |
management |
offscreen |
offscreen |
pageCapture |
pageCapture |
printing |
chrome.printing |
privacy |
privacy |
proxy |
proxy |
readingList |
readingList |
topSites |
topSites |
wallpaper |
wallpaper (Chrome app manifest) |
webNavigation |
chrome.webNavigation |
favicon |
Fetching favicons |
webview |
Open external links with a webview |
For input.ime, the manifest uses "input", not input.ime.
host_permissions: cookies and cross-origin fetch
Section titled “host_permissions: cookies and cross-origin fetch”cookies permission plus host patterns
Section titled “cookies permission plus host patterns”The cookies API requires both the cookies permission and host permissions for every host whose cookies you read or write.
To use the cookies API, declare the “cookies” permission in your manifest along with host permissions for any hosts whose cookies you want to access.
— Google, cookies
{ "host_permissions": [ "*://*.google.com/" ], "permissions": [ "cookies" ]}The Manifest V2 cookies page repeats the same requirement.
Host permissions for fetch() to external servers
Section titled “Host permissions for fetch() to external servers”Host access is not limited to cookies. The debug extensions tutorial’s key point is that external fetch() calls need the URL declared as a host permission. The Debugging extensions MV2 tutorial gives the same guidance for capabilities such as cookies, storage, and cross-origin XMLHttpRequest.
Permissions that trigger warnings or extra manifest fields
Section titled “Permissions that trigger warnings or extra manifest fields”Some permissions change what users see at install time or require additional manifest keys.
pageCapture and MHTML
Section titled “pageCapture and MHTML”You must declare pageCapture like any other API (pageCapture). The MV2 reference adds that this permission triggers a warning, and describes MHTML behavior:
This permission triggers a warning.
— Google, chrome.pageCapture
MHTML is a standard format supported by most browsers. It encapsulates in a single file a page and all its resources (CSS files, images..).
Note that for security reasons a MHTML file can only be loaded from the file system and that it can only be loaded in the main frame.
— Google, chrome.pageCapture
favicon permission and web_accessible_resources
Section titled “favicon permission and web_accessible_resources”The Fetching favicons how-to requires "favicon" in permissions. It also warns that the favicon permission triggers a warning unless paired with another permission (such as tabs) that supersedes it.
Favicons live under the extension origin. To inject them from a content script into web pages, you must expose _favicon/* via web_accessible_resources with appropriate matches (see the article’s content-script example).
notifications for Web Push in extensions
Section titled “notifications for Web Push in extensions”On normal sites, Push registration shows a permission prompt. Extensions do not get that prompt for Push; you enable the Push API by setting the notifications permission.
In order to use the Push API in your extension, you need to set the notifications permission in your manifest.json
— Google, Use Web Push
Missing notifications makes registration.pushManager fail immediately, as if the user denied permission. The notifications permission also causes an install-time permission warning, and Chrome disables the extension on existing installs until the user approves the new permission (Use Web Push).
contextMenus and menu icons
Section titled “contextMenus and menu icons”chrome.contextMenus requires contextMenus in permissions and recommends a 16×16-pixel icon next to menu items via the icons field.
geolocation permission: DOM API in UI surfaces, not in the service worker
Section titled “geolocation permission: DOM API in UI surfaces, not in the service worker”Use geolocation explains that extensions use the same navigator.geolocation Web Platform API as sites, but permission and context differ.
Geolocation on the open web uses an origin prompt. That model is not always appropriate for extensions. navigator.geolocation is a DOM API, so it is not available in worker contexts, including the Manifest V3 service worker.
For a popup or side panel, usage matches a normal document: call navigator.geolocation directly, but add "geolocation" under permissions. Without it, the API object exists but any use throws immediately, as if the user denied access.
If you do not include the permission, you will still have access to navigator.geolocation. However, any attempt to use it will cause an immediate error, the same as if the user rejected the request.
— Google, Use geolocation
management API: methods that skip the permission
Section titled “management API: methods that skip the permission”Most management methods need "management" in the manifest. Three calls are exceptions:
management.getPermissionWarningsByManifest(),management.uninstallSelf(), andmanagement.getSelf()do not require the management permission.
— Google, management
The MV2 management page lists the same three methods without requiring the permission (callback-style names without parentheses in that excerpt).
Common mistakes when mapping APIs to the manifest
Section titled “Common mistakes when mapping APIs to the manifest”- Calling an API with only the code import — each reference page states you must declare the matching permission; missing entries typically fail at runtime, not at build time.
- Using
cookieswithouthost_permissionsfor the target sites (cookies). - Assuming Web Push behaves like on the web — declare
notifications(Use Web Push). - Calling
navigator.geolocationfrom an MV3 service worker — use a popup, side panel, or other document context (Use geolocation). - Adding
faviconalone — expect a warning; pair withtabsor similar when the docs recommend it (Fetching favicons). - Updating the manifest with broader permissions —
notificationsand other warning permissions can disable existing installs until the user approves (Use Web Push).
How to check this on your site
Section titled “How to check this on your site”-
Open your unpacked extension on
chrome://extensionsand confirm every API you call has the matching entry underpermissions(andhost_permissionswhere required), using the relevant Chrome Extensions API reference page as the source of truth. -
Reload the extension after manifest changes and read any permission warnings on the extensions page, especially for
pageCapture,favicon, andnotificationsas described in chrome.pageCapture, Fetching favicons, and Use Web Push. -
Exercise one code path per declared API (for example a bookmark write, a cookie read on an allowed host, or geolocation from a popup) and confirm you do not get immediate permission errors.
-
Follow Debug extensions to trace failures when an API silently fails despite declared permissions.
-
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.